Example #1
0
 /// <summary>
 /// Test if this 2d moveable object is outside the bounds of the camera.
 /// If this moveable object has a scale (ex: sprite), it will be ignored
 /// </summary>
 /// <param name="moveable">The moveable object to test</param>
 /// <returns></returns>
 public bool IsOutsideCamera(IMoveable2d moveable)
 {
     return(IsOutsideCamera(moveable.X, moveable.Y, moveable.Width, moveable.Height));
 }
Example #2
0
 /// <summary>
 /// Remove this moveable object to the Camera's list of moveable objects to follow
 /// </summary>
 /// <param name="moveable"></param>
 public void StopFollowing2D(IMoveable2d moveable)
 {
     _toFollow.Remove(moveable);
 }
Example #3
0
 public OnMoveableMoved(IMoveable2d moveable, float OldX, float OldY)
     : base(moveable)
 {
     this.OldX = OldX;
     this.OldY = OldY;
 }
Example #4
0
 /// <summary>
 /// Add this moveable object to the Camera's list of moveable objects to follow
 /// </summary>
 /// <param name="moveable">The moveable object to follow</param>
 public void Follow2D(IMoveable2d moveable)
 {
     _toFollow.Add(moveable);
 }
Example #5
0
 public MoveableEvent(IMoveable2d moveable)
 {
     this.Moveable = moveable;
 }