void OnTriggerEnter(Collider other)
 {
     if(other.tag=="Player")
     {
         player = other.GetComponent<Player_Control>();
         player.ReceiveDamage(ATK);
     }
     Destroy(this.gameObject);
 }
Пример #2
0
 void Player_Hit()
 {
     hitColliders = Physics.OverlapSphere(Attack1_Pos.transform.position, Attack1_Range, PlayerCheckLayer);
     if (hitColliders.Length != 0)
     {
         player = hitColliders[0].GetComponent<Player_Control>();
         player.ReceiveDamage(ATK1);
     }
 }
Пример #3
0
 void OnTriggerStay(Collider other)
 {
     if (Contact == true)
     {
         if (other.tag == "Player")
         {
             if (Skill_ColdDown > 0)
             {
                 Skill_ColdDown -= 1;
             }
             else
             {
                 player = other.GetComponent<Player_Control>();
                 player.ReceiveDamage(ATK3);
                 Skill_ColdDown = Attack3_ColdDown_Set;
             }
         }
     }
 }