当前位置: 首页>>代码示例>>C#>>正文


C# MessageEventArgs.AddMessage方法代码示例

本文整理汇总了C#中MessageEventArgs.AddMessage方法的典型用法代码示例。如果您正苦于以下问题:C# MessageEventArgs.AddMessage方法的具体用法?C# MessageEventArgs.AddMessage怎么用?C# MessageEventArgs.AddMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MessageEventArgs的用法示例。


在下文中一共展示了MessageEventArgs.AddMessage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: EnterBattle

    /*UI CALLBACK*/
    public void EnterBattle(int battleType)
    {
        MessageEventArgs arg = new MessageEventArgs();
        arg.AddMessage("WindowID", UIWindowID.BattleWindow);
        EventManager.Instance.PostEvent(UIEvent.OpenUIWindow, arg);

        MessageEventArgs args = new MessageEventArgs ();
        args.AddMessage("BattleType",battleType);
        if(battleType == 0)
        {
            args.AddMessage("Man",true);
            args.AddMessage("Girl",true);
            args.AddMessage("Enemy",new int[3]{101,102,103});
        }
        else if(battleType == 1)
        {
            args.AddMessage("Man",true);
            args.AddMessage("Girl",true);
            args.AddMessage("Enemy",new int[1]{104});
        }
        else
        {
            args.AddMessage("Man",true);
            args.AddMessage("Enemy",new int[1]{105});
        }
        EventManager.Instance.PostEvent (BattleEvent.OnBattleEnter, args);
    }
开发者ID:huzhangyang,项目名称:ChineseRoguelikeGame,代码行数:28,代码来源:MapWindow.cs

示例2: OnItemClicked

 void OnItemClicked(MessageEventArgs args)
 {
     int itemID = args.GetMessage<int>("ItemID");
     ItemData itemData = DataManager.Instance.GetItemDataSet().GetItemData(itemID);
     args.AddMessage ("Message", itemData.description);
     EventManager.Instance.PostEvent (UIEvent.OnMessageSet, args);
 }
开发者ID:huzhangyang,项目名称:ChineseRoguelikeGame,代码行数:7,代码来源:ItemPanel.cs

示例3: Revert

    protected override void Revert()
    {
        source.buffFrozenTime = 0;

        MessageEventArgs args = new MessageEventArgs ();
        args.AddMessage("Message",string.Format("{0}不再<冰冻>了!", source.GetName()));
        EventManager.Instance.PostEvent (BattleEvent.OnBuffDeactivated, args);
    }
开发者ID:huzhangyang,项目名称:ChineseRoguelikeGame,代码行数:8,代码来源:BuffFrozen.cs

示例4: Init

    protected override void Init()
    {
        source.buffFrozenTime = 5;

        MessageEventArgs args = new MessageEventArgs ();
        args.AddMessage("Message",string.Format("{0}因为<冰冻>,暂时不能行动!", source.GetName()));
        EventManager.Instance.PostEvent (BattleEvent.OnBuffActivated, args);
    }
开发者ID:huzhangyang,项目名称:ChineseRoguelikeGame,代码行数:8,代码来源:BuffFrozen.cs

示例5: Execute

    protected override void Execute()
    {
        source.damageTaken.interrupt = 0;

        MessageEventArgs args = new MessageEventArgs ();
        args.AddMessage("Message",string.Format("{0}因为<霸体>,没有被击退!", source.GetName()));
        EventManager.Instance.PostEvent (BattleEvent.OnBuffActivated, args);
    }
开发者ID:huzhangyang,项目名称:ChineseRoguelikeGame,代码行数:8,代码来源:BuffEndure.cs

示例6: Init

    protected override void Init()
    {
        source.timelinePosition = 0;

        MessageEventArgs args = new MessageEventArgs ();
        args.AddMessage("Message",string.Format("{0}被<击倒>了!", source.GetName()));
        EventManager.Instance.PostEvent (BattleEvent.OnBuffActivated, args);
    }
开发者ID:huzhangyang,项目名称:ChineseRoguelikeGame,代码行数:8,代码来源:BuffKnockout.cs

示例7: OnTriggerEnter

 void OnTriggerEnter( Collider collider )
 {
     if ( !stayAway.level.Equals(LogicManager.Instance.tempLevel.level ) )
         return;
     Character character = collider.GetComponent<Character>();
     if ( character != null )
     {
         Debug.Log("Center Enter" + transform.parent.name );
         MessageEventArgs msg = new MessageEventArgs();
         msg.AddMessage("message" , message );
         if ( isItem )
             msg.AddMessage("type" , Global.ITEM);
         if ( isPerson )
             msg.AddMessage("type" , Global.PERSON );
         msg.AddMessage("process" , process.ToString());
         BEventManager.Instance.PostEvent( EventDefine.OnEnterCenter , this , msg );
     }
 }
开发者ID:AtwoodDeng,项目名称:spaceChange,代码行数:18,代码来源:Center.cs

示例8: Execute

 protected override void Execute()
 {
     source.damageTaken.dmg = 0;
     source.damageTaken.interrupt = 0;
     MessageEventArgs args = new MessageEventArgs ();
     args.AddMessage("Message",string.Format("{0}因为<祝福>,完全抵御了此次伤害!", source.GetName()));
     EventManager.Instance.PostEvent (BattleEvent.OnBuffActivated, args);
     source.buffList.Remove(this);
 }
开发者ID:huzhangyang,项目名称:ChineseRoguelikeGame,代码行数:9,代码来源:BuffBlessed.cs

示例9: OnLeaderButtonClick

    public void OnLeaderButtonClick()
    {
        configData.currentLeaderID = 1 - configData.currentLeaderID;// 0->1, 1->0
        leaderButton.image.sprite = Resources.Load(GlobalDataStructure.PATH_UIIMAGE_BATTLE + "Avatar0" + configData.currentLeaderID, typeof(Sprite)) as Sprite;
        SaveManager.Instance.SaveConfig();

        MessageEventArgs args = new MessageEventArgs ();
        args.AddMessage("LeaderID",configData.currentLeaderID);
        EventManager.Instance.PostEvent(UIEvent.OnSwitchLeader, args);
    }
开发者ID:huzhangyang,项目名称:ChineseRoguelikeGame,代码行数:10,代码来源:MapWindow.cs

示例10: Revert

 protected override void Revert()
 {
     if(source.GetBattleType() != BattleType.Physical)
     {
         source.maxHPMulti += 0.5f;
         MessageEventArgs args = new MessageEventArgs ();
         args.AddMessage("Message",string.Format("{0}不再<气虚>了!", source.GetName()));
         EventManager.Instance.PostEvent (BattleEvent.OnBuffDeactivated, args);
     }
 }
开发者ID:huzhangyang,项目名称:ChineseRoguelikeGame,代码行数:10,代码来源:BuffWeak.cs

示例11: OnExitButtonClick

    public void OnExitButtonClick()
    {
        this.gameObject.SetActive(false);

        DataManager.Instance.UnLoadAllData();

        MessageEventArgs arg = new MessageEventArgs();
        arg.AddMessage("WindowID", UIWindowID.IntroWindow);
        EventManager.Instance.PostEvent(UIEvent.OpenUIWindow, arg);
    }
开发者ID:huzhangyang,项目名称:ChineseRoguelikeGame,代码行数:10,代码来源:SettingPanel.cs

示例12: Execute

    protected override void Execute()
    {
        poisonTurns++;
        int previousHP = source.currentHP;
        source.currentHP -= Mathf.RoundToInt(source.maxHP * poisonTurns * 0.05f);

        MessageEventArgs args = new MessageEventArgs ();
        args.AddMessage("Message",string.Format("{0}因为<中毒>,失去了{1}点生命!", source.GetName(), previousHP - source.currentHP));
        EventManager.Instance.PostEvent (BattleEvent.OnBuffActivated, args);
    }
开发者ID:huzhangyang,项目名称:ChineseRoguelikeGame,代码行数:10,代码来源:BuffPoison.cs

示例13: Revert

    protected override void Revert()
    {
        source.attackMulti -= 0.2f;
        source.defenceMulti -= 0.2f;
        source.speedMulti -= 0.2f;

        MessageEventArgs args = new MessageEventArgs ();
        args.AddMessage("Message",string.Format("{0}不再<激昂>了!", source.GetName()));
        EventManager.Instance.PostEvent (BattleEvent.OnBuffDeactivated, args);
    }
开发者ID:huzhangyang,项目名称:ChineseRoguelikeGame,代码行数:10,代码来源:BuffExcited.cs

示例14: Revert

    protected override void Revert()
    {
        source.accuracyMulti += 0.25f;
        source.evasionMulti += 0.25f;
        source.critMulti += 0.25f;
        source.critResistMulti += 0.25f;

        MessageEventArgs args = new MessageEventArgs ();
        args.AddMessage("Message",string.Format("{0}不再<麻痹>了!", source.GetName()));
        EventManager.Instance.PostEvent (BattleEvent.OnBuffDeactivated, args);
    }
开发者ID:huzhangyang,项目名称:ChineseRoguelikeGame,代码行数:11,代码来源:BuffParalized.cs

示例15: Start

    void Start()
    {
        DontDestroyOnLoad(this.gameObject);
        Application.runInBackground = false;
        Screen.sleepTimeout = SleepTimeout.NeverSleep;
        DataManager.Instance.LoadConfig();

        UIManager.Instance.PreloadWindow();
        MessageEventArgs args = new MessageEventArgs();
        args.AddMessage("WindowID", UIWindowID.IntroWindow);
        EventManager.Instance.PostEvent(UIEvent.OpenUIWindow, args);
    }
开发者ID:huzhangyang,项目名称:ChineseRoguelikeGame,代码行数:12,代码来源:GlobalManager.cs


注:本文中的MessageEventArgs.AddMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。