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); }
void OnEnable() { EventPool.StartListening <string, string>(EventTypes.MessageArrived, NewMessageArrived); InfoPool.Provide("unread_messages", GetUnreadMessages); }
private void OnEnable() { InfoPool.Provide <float>("MousePositionMagnitude", GetMousePositionMagnitude); }
private void OnEnable() { InfoPool.Provide("defend bonus", GetDefendBonus); }