void Awake() { DontDestroyOnLoad(transform.gameObject); DontDestroyOnLoad(transform.gameObject); if (gameControl == null) { gameControl = this; } else { GameObject.Destroy(this.gameObject); } GameVariables.LoadProgress(); GameVariables.LoadOptions(); musicController = MusicController.Get(); soundController = SoundController.Get(); //IsOnPause = true; // If we load level with Board & Ball: boardController = BoardController.Get(); // ballController = BallController.Get(); levelController = LevelController.Get(); guiController = GuiController.Get(); TempSetControlType(0); }
public void TempSetControlType(int controlType) { if (controlType == 0) { if (arrowsPanel == null) { arrowsPanel = GameObject.Find("ControlsArrowsPanel"); } if (arrowsPanel != null) { arrowsPanel.SetActive(true); } } else { if (GameObject.Find("ControlsArrowsPanel") != null) { arrowsPanel = GameObject.Find("ControlsArrowsPanel"); } arrowsPanel.SetActive(false); } BoardController.Get().ControlType = controlType; }
public void UnPauseGame() { IsOnPause = false; BoardController.Get().OnUnpause(); BallController.Get().OnUnpause(); }
public void PauseGame() { IsOnPause = true; BoardController.Get().OnPause(); BallController.Get().OnPause(); }
public void Cleanup() { BoardController.Get().Cleanup(); BallController.Get().Cleanup(); }
public void BoardConstantMove(float speed) { BoardController.Get().ConstantMove(speed); }