예제 #1
0
 private void OnCollisionEnter2D(Collision2D collision)
 {
     if (collision.relativeVelocity.y >= 0f)
     {
         Rigidbody2D collidingBody = collision.collider.GetComponent <Rigidbody2D>();
         if (collidingBody != null)
         {
             DeathController.Kill();
         }
     }
 }
예제 #2
0
 public void Kill()
 {
     dc.Kill();
 }