public void Start() { _FlappyBird = GameObject.FindGameObjectWithTag("Bird"); _FlappyBirdInput = _FlappyBird.GetComponent <BirdInput> (); _PipeSpawner = GameObject.FindObjectOfType <SpawnPipeInArea> (); SetGameObjectsEnabled(false); _Title.SetActive(true); _GameOver.SetActive(false); _Score.SetScore(_Points); _Score.gameObject.SetActive(false); }
void Awake() { if (instance != null && instance != this) { Destroy(this.gameObject); return; } else { instance = this; } }