Beispiel #1
0
 public override void MyOnCollisionEnter(MyCollision c)
 {
     // Adjust the velocity of the cannon ball
     if (c.gameObject.GetComponent <CannonBall>())
     {
         if (gameObject.GetComponent <Renderer>().material.color.a > 0)
         {
             CannonBall cb = c.gameObject.GetComponent <CannonBall>();
             cb.vx -= vx * 30;
             cb.vy += vy * 30;
             cb.GhostDestroy();
         }
     }
 }