Esempio n. 1
0
 void OnCollisionEnter(Collision en)
 {
     if (en.gameObject.tag == "DollBear")
     {
         charname = nameitem.ToCharArray();
         nameitem = "";
         for (int i = 0; i < charname.Length; i++)
         {
             if (i == charname.Length - 1)
             {
                 charname[i] = ' ';
             }
             if (charname[i] != ' ')
             {
                 nameitem = nameitem + charname[i].ToString();
             }
         }
         doll = false;
         Destroy(GameObject.Find(nameitem));
     }
     if (en.gameObject.name == "Player")
     {
         rce.setCheckSound(false);
         main.setCKI(false);
         main.setNameEnemy("");
         player.setHP(player.getHP() - player.getHP());
         Destroy(destoy);
     }
 }
Esempio n. 2
0
 void OnTriggerExit(Collider en)
 {
     if (en.tag == "Enemy")
     {
         // player.Checkenemyforanim = false;
         checksound = false;
         main.setNameEnemy("");
         main.setCKI(false);
     }
 }
Esempio n. 3
0
 void OnCollisionEnter(Collision en)
 {
     if (en.gameObject.name == "Player")
     {
         rce.setCheckSound(false);
         main.setCKI(false);
         main.setNameEnemy("");
         player.setHP(player.getHP() - player.getHP());
         Destroy(destoy);
     }
 }