public void StartNewGame() { if (isPlaying) { return; } if (scoreManager != null) { Destroy(scoreManager); } if (bubbleManager != null) { Destroy(bubbleManager); } if (timeManager != null) { Destroy(timeManager); } isPlaying = true; scoreManager = gameObject.AddComponent <ScoreManager>(); bubbleManager = gameObject.AddComponent <BubbleManager>(); timeManager = gameObject.AddComponent <TimeManager>(); gameMenu.Close(); }
public void CloseCurrentMenu() { if (currentlyOpen != null) { currentlyOpen.Close(); WorldController.Instance.SpawnInventoryController.SetUIVisibility(SettingsKeyHolder.DeveloperMode); WorldController.Instance.BuildModeController.Building = false; } currentlyOpen = null; }
void btnResume_Click(object sender, EventArgs e) { gameMenu.Close(); }