void OnDestroy() { #if FULLLOG MoreDebug.Log("go: " + gameObject.name); // QuitClean.QuitGame(); #endif // Unsub events OnBeginCampaign.RemoveAllListeners(); OnEndCampaign.RemoveAllListeners(); OnWinCampaign.RemoveAllListeners(); OnLoseCampaign.RemoveAllListeners(); _count--; }
private void LoseCampaign() { #if FULLLOG MoreDebug.Log("go: " + gameObject.name); #endif if (!PauseGame.exists) { #if FULLLOG MoreDebug.Log("No PauseGame -----"); #endif } MessageBoxParams parms = new MessageBoxParams(); parms.Message = FailureInfo; parms.MessageBoxTitle = CampaignName; parms.Button1Action = PauseGame.only.queueResume; parms.MultipleCallBehaviour = MultipleCallBehaviours.Queue; EasyMessageBox.Show(parms); PauseGame.only.queuePause(); OnLoseCampaign.Invoke(); CampaignManager.EndCampaign(); }