// Update is called once per frame void Update() { if (BossDeathTracker.CheckDead(bossId)) { if (alive != null) { alive.SetActive(false); } if (dead != null) { dead.SetActive(true); } } else { if (alive != null) { alive.SetActive(true); } if (dead != null) { dead.SetActive(false); } } }
// Use this for initialization void Start() { if (BossDeathTracker.CheckDead(bossId)) { if (alive != null) { alive.SetActive(false); } if (dead != null) { dead.SetActive(true); } } else { if (alive != null) { alive.SetActive(true); } if (dead != null) { dead.SetActive(false); } } if (!checkEachFrame) { Destroy(this); } }
// Use this for initialization void Start() { if (!BossDeathTracker.CheckDead(2)) { health = startHealth; spawner.StartSpawning(); } }
// Update is called once per frame void Update() { if (health <= 0) { BossDeathTracker bdt = GetComponent <BossDeathTracker>(); if (bdt != null) { bdt.MarkDead(); } spawner.StopSpawning(); } }
public void NotifyDeath() { count--; if (count <= 0) { Destroy(gameObject); BossDeathTracker track = GetComponent <BossDeathTracker>(); if (track) { track.MarkDead(); } } }
public void NotifyDeath() { count--; if (count <= 0) { gameObject.SetActive(false); BossDeathTracker track = GetComponent <BossDeathTracker>(); if (track) { track.MarkDead(); } } }