Beispiel #1
0
 void OnCollisionEnter2D(Collision2D coll)
 {
     if (coll.gameObject != proprio)
     {
         Destroyable destroyable = coll.collider.GetComponent <Destroyable>();
         if (destroyable != null)
         {
             destroyable.Hit(gameObject);
         }
         //   if (Time.time - startTime > 0.2f)
         //    Hit(gameObject);
     }
 }