Exemple #1
0
 public void ChangeGameSpeed(float newSpeed)
 {
     if ((int)newSpeed == 0)
     {
         uc.ChangeState <PauseState>();
     }
     else
     {
         uc.ChangeState <RunState>();
         uc.Speed = (UpdateController.GameSpeed)(int) newSpeed;
     }
 }
Exemple #2
0
    private void Awake()
    {
        CreateMap();
        UpdateController uc = FindObjectOfType <UpdateController>();

        uc.ChangeState <RunState>();
        squareGrid = FindObjectOfType <SquareGrid>();
    }