private void Awake() { if (_instance != null && _instance != this) { Destroy(this.gameObject); } else { _instance = this; } }
//public void GameOver() //{ //} //public void JumpedOverFox() //{ //} // Start is called before the first frame update void Start() { chordSender = GetComponentInChildren <ChordSender>(); foxManager = GetComponent <FoxManager>(); chickenDying = GetComponent <AudioSource>(); camPosition = Camera.main.transform.position; camRotation = Camera.main.transform.rotation; screenShake = Camera.main.GetComponent <ScreenShake>(); foxManager.SetFoxSpeed(defaultFoxSpeed); foxWaitTime = defaultFoxWaitTime; lives = initialnumberOfLives; GetScores(); gameState = GameState.begin; }