Esempio n. 1
0
 // As above, using the other object's boundingRadius
 public bool IsTouching(VisibleObject other)
 {
     return(IsTouching(other, other.boundingRadius));
 }
Esempio n. 2
0
 public MessageNotifyCloseToObject(VisibleObject closeToObject)
 {
     this.closeToObject = closeToObject;
 }
Esempio n. 3
0
 // Return true if this object is in collision with a VisibleObject bounded by
 // a specified radius.  Note that a VisibleObject's coordinates are defined
 // starting from the upper left corner of the object, so its bounding
 // radius must be added to both X and Y coordinates to obtain the centre
 // of the object.
 public bool IsTouching(VisibleObject other, int radius)
 {
     return(IsTouching(other.X, other.Y, other.BoundingRadius, radius));
 }
Esempio n. 4
0
 protected virtual void NotifyBumped(VisibleObject bumpedObject)
 {
 }
Esempio n. 5
0
 public virtual void NotifyCloseToObject(VisibleObject objectCloseBy)
 {
 }
Esempio n. 6
0
 protected override void NotifyBumped(VisibleObject bumpedObject)
 {
     Speed = 0;
     base.NotifyBumped(bumpedObject);
 }
Esempio n. 7
0
 private void DoNotifyBumped(VisibleObject touchingObject)
 {
     SendMessage(new MessageNotifyBumped(touchingObject));
     touchingObject.SendMessage(new MessageNotifyBumped(this));
 }