예제 #1
0
 public void SetOrientation(SpriteOrientation spriteOrientation)
 {
     this.spriteOrientation = spriteOrientation;
     if (this.spriteOrientation == SpriteOrientation.Left)
     {
         this.Velocity = new Vector2(-speed, 0);
     }
     else if (this.spriteOrientation == SpriteOrientation.Right)
     {
         this.Velocity = new Vector2(speed, 0);
     }
     else if (this.spriteOrientation == SpriteOrientation.Up)
     {
         this.Velocity = new Vector2(0, -speed);
     }
     this.sprite = SpriteFactory.GetNeedleSprite(this.spriteOrientation);
 }