Example #1
0
 void ApplyDMG(int DMG)
 {
     //Total += DMG;
     //if (Total < 200)
     //{
     //    hp = hp - DMG;
     //}
     hp -= DMG;
     if (hp <= 0)
     {
         GameObject GO = Instantiate(Death, transform.position, Quaternion.identity);
         Destroy(GO, 2);
         QuestLog.AddEXP(EXP);
         if (gameObject.name == "ChaserMiniboss" || gameObject.name == "RangerMiniboss" || gameObject.name == "WarperMiniboss")
         {
             GameObject.Find("OverWorld Control").GetComponent <QuestLog>().MiniBossHelper();
             //QuestLog.ForestMinibossCounter();
         }
         Destroy(gameObject);
     }
 }