Exemplo n.º 1
0
        void Awake()
        {
            if (ballControl == null)
            {
                ballControl = this;
            }
            else
            {
                GameObject.Destroy(this.gameObject);
            }

            balls = new Ball[0];
        }
Exemplo n.º 2
0
 public static BallController Get()
 {
     if (ballControl != null)
     {
         return(ballControl);
     }
     else
     {
         GameObject obj = new GameObject("BallController");
         obj.transform.SetParent(GameController.Get().transform);
         obj.tag     = "Controller";
         ballControl = obj.AddComponent <BallController>();
         return(ballControl);
     }
 }
Exemplo n.º 3
0
 public void UnPauseGame()
 {
     IsOnPause = false;
     BoardController.Get().OnUnpause();
     BallController.Get().OnUnpause();
 }
Exemplo n.º 4
0
 public void PauseGame()
 {
     IsOnPause = true;
     BoardController.Get().OnPause();
     BallController.Get().OnPause();
 }
Exemplo n.º 5
0
 public void Cleanup()
 {
     BoardController.Get().Cleanup();
     BallController.Get().Cleanup();
 }