Ejemplo n.º 1
0
 private void OnEnable()
 {
     EventPool.StartListening(EventTypes.Move, Move);
     EventPool.StartListening <Transform>(EventTypes.MoveTo, MoveTo);
     EventPool.StartListening <bool>(EventTypes.ActionNoTarget, NoTargetAction);
     EventPool.StartListening <ActionType, UnitController>(EventTypes.ActionEnemyTarget, TargetEnemy);
     EventPool.StartListening <ActionType, UnitController>(EventTypes.ActionFriendlyTarget, TargetFriend);
     EventPool.StartListening <ActionType, AvatarController>(EventTypes.ActionFriendlyTargetAvatar, TargetFriend);
     EventPool.StartListening(EventTypes.Cancel, CancelAction);
     EventPool.StartListening <UnitController>(EventTypes.Targeted, ExecuteTargetingAction);
     EventPool.StartListening <UnitController>(EventTypes.UnitDeath, RemoveUnit);
     InfoPool.Provide("Battlefield units", GetBattlefieldUnits);
 }
Ejemplo n.º 2
0
 void OnEnable()
 {
     EventPool.StartListening <string, string>(EventTypes.MessageArrived, NewMessageArrived);
     InfoPool.Provide("unread_messages", GetUnreadMessages);
 }
Ejemplo n.º 3
0
 private void OnEnable()
 {
     InfoPool.Provide <float>("MousePositionMagnitude", GetMousePositionMagnitude);
 }
Ejemplo n.º 4
0
 private void OnEnable()
 {
     InfoPool.Provide("defend bonus", GetDefendBonus);
 }