예제 #1
0
 private void TriggerEvents(object sender, CollisionEventArgs args)
 {
     if (args.IsColliding && Entered != null)
     {
         Entered(this, new WorldObjectEventArgs(args.Other.RootObject));
     }
     else if(!args.IsColliding && Exited != null)
     {
         Exited(this, new WorldObjectEventArgs(args.Other.RootObject));
     }
 }
예제 #2
0
 public void RevokeCollision(CollisionEventArgs args)
 {
     if (CollisionEnd != null)
         CollisionEnd(this, args);
 }
예제 #3
0
 public void InvokeCollision(CollisionEventArgs args)
 {
     if (CollisionStart != null)
         CollisionStart(this, args);
 }
예제 #4
0
 private void UpdateMessage(object sender, CollisionEventArgs args)
 {
     if (args.IsColliding)
     {
         Log.WriteLine("Colliding!");
     }
     else
     {
         Log.WriteLine("No Colliding!");
     }
 }