void Start() { anim = GetComponent <Animator> (); Game_manager.OnDuckMiss += MakeInvincible; Game_manager.OnDuckShot += MakeInvincible; dUI = GameObject.Find("GameManager").GetComponent <DuckUI> (); }
void Start() { anim = GetComponent<Animator> (); Game_manager.OnDuckMiss += MakeInvincible; Game_manager.OnDuckShot += MakeInvincible; dUI = GameObject.Find ("GameManager").GetComponent <DuckUI> (); }
void OnLevelWasLoaded() { //reassign UI elements as they arent singleton for some reason. if (GameObject.FindGameObjectWithTag("UI") != null) { healthUI = GameObject.FindGameObjectWithTag("UI").GetComponent <DuckUI> (); } if (GameObject.FindGameObjectWithTag("pointsText") != null) { pointsText = GameObject.FindGameObjectWithTag("pointsText").GetComponent <Text> (); pointsText.text = _score.ToString(); } _audioSource = GetComponent <AudioSource> (); DificultyLevel = PlayerPrefs.GetInt("difficulty"); }
void Start() { dUI = GameObject.Find("GameManager").GetComponent <DuckUI> (); Game_manager.OnSpawnDucks += SpawnDuck; }
void OnLevelWasLoaded() { //reassign UI elements as they arent singleton for some reason. if (GameObject.FindGameObjectWithTag ("UI") != null) { healthUI = GameObject.FindGameObjectWithTag ("UI").GetComponent<DuckUI> (); } if (GameObject.FindGameObjectWithTag ("pointsText") != null) { pointsText = GameObject.FindGameObjectWithTag ("pointsText").GetComponent<Text> (); pointsText.text = _score.ToString(); } _audioSource = GetComponent<AudioSource> (); DificultyLevel = PlayerPrefs.GetInt ("difficulty"); }
void Start() { dUI = GameObject.Find ("GameManager").GetComponent <DuckUI> (); Game_manager.OnSpawnDucks += SpawnDuck; }
static void Main(string[] args) { var ui = new DuckUI(); ui.Run(); }