private void OnDisable() { EventPool.StopListening(EventTypes.Move, Move); EventPool.StopListening <Transform>(EventTypes.MoveTo, MoveTo); EventPool.StopListening <bool>(EventTypes.ActionNoTarget, NoTargetAction); EventPool.StopListening <ActionType, UnitController>(EventTypes.ActionEnemyTarget, TargetEnemy); EventPool.StopListening <ActionType, UnitController>(EventTypes.ActionFriendlyTarget, TargetFriend); EventPool.StopListening <ActionType, AvatarController>(EventTypes.ActionFriendlyTargetAvatar, TargetFriend); EventPool.StopListening(EventTypes.Cancel, CancelAction); EventPool.StopListening <UnitController>(EventTypes.Targeted, ExecuteTargetingAction); EventPool.StopListening <UnitController>(EventTypes.UnitDeath, RemoveUnit); InfoPool.Unprovide("Battlefield units", GetBattlefieldUnits); }
void OnDisable() { EventPool.StopListening <string, string>(EventTypes.MessageArrived, NewMessageArrived); InfoPool.Unprovide("unread_messages", GetUnreadMessages); }
private void OnDisable() { InfoPool.Unprovide <float>("MousePositionMagnitude", GetMousePositionMagnitude); }
private void OnDisable() { InfoPool.Unprovide("defend bonus", GetDefendBonus); }