Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
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;
 }
Ejemplo n.º 3
0
 public void UnPauseGame()
 {
     IsOnPause = false;
     BoardController.Get().OnUnpause();
     BallController.Get().OnUnpause();
 }
Ejemplo n.º 4
0
 public void PauseGame()
 {
     IsOnPause = true;
     BoardController.Get().OnPause();
     BallController.Get().OnPause();
 }
Ejemplo n.º 5
0
 public void Cleanup()
 {
     BoardController.Get().Cleanup();
     BallController.Get().Cleanup();
 }
Ejemplo n.º 6
0
 public void BoardConstantMove(float speed)
 {
     BoardController.Get().ConstantMove(speed);
 }