本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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 );
}
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}