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