Beispiel #1
0
 void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.transform.tag == "Player")
     {
         Character1 character1 = collision.GetComponent <Character1>();
         character1.Damage(damage);
     }
     if (collision.transform.tag == "hitbox")
     {
         smoke clone = (smoke)Instantiate(dust, gameObject.transform.position, gameObject.transform.rotation);
         Destroy(gameObject);
     }
 }