void Update() { if (isEnemySpawner == true) { HUDUpdate.EnemiesCounter(enemiesAlive); } }
void Start() { m_Body = GetComponent <Rigidbody2D>(); ship = GameObject.Find("Ship").GetComponent <ShipControl>(); HUD = GameObject.Find("HUD").GetComponent <Canvas>().GetComponent <HUDUpdate>(); StartCoroutine(Shoot()); EnMan = GameObject.Find("HUD").GetComponent <EnemyManager>(); m_ExplSFX = GameObject.Find("EnemyKills").GetComponent <AudioSource>(); }
void Update() { if (healthAmount <= 0) { spawner.EnemyCounter(); HUDUpdate.AddPoints(pointsAmount); Instantiate(particle, transform.position, Quaternion.identity); gameObject.SetActive(false); } }
// Use this for initialization void Start() { stats = GameObject.Find("HUD").GetComponent <HUDUpdate>(); score = stats.score; time = stats.time; newscore = stats.score; m_Score.text = "Score\n" + score; m_Time.text = "Time Bonus\n" + time; m_Shots.text = "Shots Fired\n" + stats.shots; m_Hits.text = "Hits\n" + stats.hits; m_Kills.text = "Enemy Kills\n" + stats.enemykills; m_Wave.text = "Wave\n" + stats.wave; m_Options.text = " "; StartCoroutine(scoreMultiply()); }
void Awake() => _instance = this;