示例#1
0
 //Response Methods
 public void ChangeDirection()
 {
     if (spriteOrientation == SpriteOrientation.Right)
     {
         spriteOrientation = SpriteOrientation.Left;
     }
     else if (spriteOrientation == SpriteOrientation.Left)
     {
         spriteOrientation = SpriteOrientation.Right;
     }
     sprite   = SpriteFactory.GetHortoiseSprite(this.spriteOrientation);
     Velocity = new Vector2(-Velocity.X, Velocity.Y);
 }
示例#2
0
 public HortoiseEnemy(Rectangle position, int power, int velocity, SpriteOrientation spriteOrientation, CollisionType collisionType, string message)
 {
     this.Position              = new Vector2(position.X, position.Y);
     this.Size                  = new Vector2(position.Width, position.Height);
     this.Power                 = power;
     this.Velocity              = new Vector2(velocity, 0);
     this.CollisionType         = CollisionType.Liquid;
     this.IsAlive               = true;
     this.spriteOrientation     = spriteOrientation;
     this.sprite                = SpriteFactory.GetHortoiseSprite(this.spriteOrientation);
     this.ShouldNotifyReceivers = false;
     this.CollisionType         = collisionType;
     this.MessageToReceivers    = message;
 }