public void Action(MappableActions action) { if (Orders.Any(o => o.Order == action)) { Team.LeaderShout(Orders.First(o => o.Order == action)); } switch (action) { case MappableActions.Hide: //Shout from leader Team.Hide(); break; case MappableActions.Attack: Team.Attack(); break; case MappableActions.Flee: Team.Flee(); break; case MappableActions.Menu: break; case MappableActions.FixCamOnLeader: FollowGoblin = Team.Leader; break; case MappableActions.Camp: Team.Camp(); break; case MappableActions.InvincibleMode: GameManager.Instance.InvincibleMode = !GameManager.Instance.InvincibleMode; break; case MappableActions.AddXp: CharacterView.AddXp(); break; case MappableActions.Move: MoveView(); break; case MappableActions.ZoomIn: ZoomIn(); break; case MappableActions.ZoomOut: ZoomOut(); break; case MappableActions.Pause: if (GameManager.Instance.GamePaused) { GameManager.UnPause(); } else { GameManager.Pause(); } break; case MappableActions.Kill: CharacterView.Kill(); break; default: throw new ArgumentOutOfRangeException(); } }