Пример #1
0
 protected bool IsTouchingBottom(BaseGameObject sprite)
 {
     return(BoundingBox.Top + Velocity.Y < sprite.BoundingBox.Bottom &&
            BoundingBox.Bottom > sprite.BoundingBox.Bottom &&
            BoundingBox.Left < sprite.BoundingBox.Right &&
            BoundingBox.Right > sprite.BoundingBox.Left);
 }
Пример #2
0
 protected bool IsTouchingLeft(BaseGameObject sprite)
 {
     return(BoundingBox.Right + Velocity.X > sprite.BoundingBox.Left &&
            BoundingBox.Left < sprite.BoundingBox.Left &&
            BoundingBox.Top < sprite.BoundingBox.Bottom &&
            BoundingBox.Bottom > sprite.BoundingBox.Top);
 }
Пример #3
0
 public void FollowTarget(BaseGameObject target)
 {
     //make tracking algorithm
 }