Example #1
0
 void OnTriggerEnter2D(Collider2D col)
 {
     if (!hitedPlayer)
     {
         if (!col.isTrigger && col.CompareTag("Player") && col.name.Equals("Volstagg") && boss.airStriking)
         {
             player.HurtPlayer(1);
             SoundManagerScript.PlaySound("dragonFlyBy");
             hitedPlayer = true;
         }
     }
 }
Example #2
0
 void OnTriggerEnter2D(Collider2D col)
 {
     if (!col.isTrigger && col.CompareTag("Player") && col.name.Equals("Volstagg"))
     {
         playerHealth.HurtPlayer(damage);
         playerHealth.SlowPlayer();
         StartCoroutine(DestroyFireball());
         SoundManagerScript.PlaySound("fireballImpact");
     }
     else if (!col.isTrigger && col.CompareTag("Player"))
     {
         StartCoroutine(DestroyFireball());
         SoundManagerScript.PlaySound("fireballImpact");
     }
 }
Example #3
0
 private void OnTriggerStay2D(Collider2D col)
 {
     if (!col.isTrigger && col.CompareTag("Player"))
     {
         if (!isBroken)
         {
             if (!steped)
             {
                 StartCoroutine(HoleAnimation());
             }
         }
         else
         {
             playerHealth.HurtPlayer(5);
         }
     }
 }