public override void OnEnter() { foreach (MenuDisplayObject button in BaseStateManager.AllButtons) { button.isVisible = true; } BaseStateManager.ButtonControl = ButtonControl.Menu; CursorActions(); MissionManager.CheckMissionLogic(Game); if (MissionManager.MissionStartBuffer.Count > 0) { BaseStateManager.ChangeMenuSubState("Mission"); BaseStateManager.MissionMenuState.DisplayMissionStartBufferText(); return; } if (MissionManager.MissionEventBuffer.Count > 0) { BaseStateManager.ChangeMenuSubState("Mission"); BaseStateManager.MissionMenuState.MissionEvent(); return; } if (BaseState.GetBase() != null) { if (MissionManager.ReturnCompletedMissions(BaseState.GetBase().name).Count <= 0 && MissionManager.ReturnFailedMissions(BaseState.GetBase().name).Count <= 0) { CursorActions(); } else if (MissionManager.ReturnCompletedMissions(BaseState.GetBase().name).Count > 0) { BaseStateManager.ChangeMenuSubState("Mission"); BaseStateManager.MissionMenuState.DisplayMissionCompletedText(); } else if (MissionManager.ReturnFailedMissions(BaseState.GetBase().name).Count > 0) { BaseStateManager.ChangeMenuSubState("Mission"); BaseStateManager.MissionMenuState.DisplayMissionFailedText(); } } }