Exemple #1
0
 // 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);
         }
     }
 }
Exemple #2
0
 // 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();
     }
 }
Exemple #5
0
 public void NotifyDeath()
 {
     count--;
     if (count <= 0)
     {
         Destroy(gameObject);
         BossDeathTracker track = GetComponent <BossDeathTracker>();
         if (track)
         {
             track.MarkDead();
         }
     }
 }
Exemple #6
0
 public void NotifyDeath()
 {
     count--;
     if (count <= 0)
     {
         gameObject.SetActive(false);
         BossDeathTracker track = GetComponent <BossDeathTracker>();
         if (track)
         {
             track.MarkDead();
         }
     }
 }