Exemplo n.º 1
0
 public void Die()
 {
     box_particles.SpawnParticle(transform);
     CombatEvents.EnemyDied(this);
     Debug.Log("killed box");
     gameObject.SetActive(false);
 }
Exemplo n.º 2
0
 //when it hits anything so be vigilant about adding stuff
 private void OnCollisionEnter2D(Collision2D collision)
 {
     for (int i = 0; i < tags.Length; i++)
     {
         if (collision.collider.tag == tags[i])
         {
             particles.SpawnParticle(transform);
             gameObject.SetActive(false);
             Debug.Log("player projectile hit :" + collision.collider.tag);
         }
     }
     if (collision.collider.tag == "TurnObjectsOn")
     {
         gameObject.SetActive(false);
         Debug.Log("player projectile hit :" + collision.collider.tag);
     }
 }