Beispiel #1
0
 private void OnCollisionEnter(Collision collision)
 {
     if (collision.transform.tag == "Bullet")
     {
         minionMonster.basecharacterinformation.SubtractionHP(1);
         if (minionMonster.basecharacterinformation.IsDie())
         {
             Destroy(drawBar.GetMHeadUpPosition());
             Destroy(drawBar.GetMonsterHPber());
             Destroy(gameObject);
         }
     }
 }
Beispiel #2
0
    private void OnCollisionEnter(Collision collision)
    {
        if (collision.transform.tag == "Bullet")
        {
            minionMonster.basecharacterinformation.SubtractionHP(1);

            for (int i = 0; i < drawBar.GetSliderMListHPber().Count; i++)
            {
                if (minionMonster.basecharacterinformation.IsDie(i))
                {
                    Destroy(drawBar.GetMHeadUpPosition(i).gameObject);
                    Destroy(drawBar.GetMonsterHPber(i).gameObject);
                    Destroy(gameObject);

                    drawBar.RemoveMonsterList(i);
                }
            }
        }
    }