void Awake() { camTarget = GameObject.FindGameObjectWithTag("CamTarget").transform; camTargetRb = camTarget.GetComponent <Rigidbody>(); cam = this.GetComponent <Camera>(); inputHandler = FindObjectOfType <InputHandler>(); follow = FindObjectsOfType <BallFollow>().First(b => b.name == "CamTarget"); }
void GameOver() { BallFollow.Stop(); SpawnController.StopSpawning(); gameplayGUI.ShowGameOverMessage(true); currentState = State.PostGame; Time.timeScale = 0f; Debug.Log("GameController: Game Over"); }