Пример #1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (KingsValley game = new KingsValley())
     {
         game.Run();
     }
 }
Пример #2
0
 //Constructor
 public Explorer(KingsValley game, Vector2 position)
 {
     this.game = game;
     this.position = position;
     this.texture = game.Content.Load<Texture2D>(@"Explorer\explorer");
     this.rectangle = new Rectangle((int)this.position.X,
                                    (int)this.position.Y,
                                    this.texture.Width / 8,
                                    this.texture.Height);
     this.walkRight = new ExplorerWalkRight(this);
     this.idleRight = new ExplorerIdleRight(this);
     this.walkLeft = new ExplorerWalkLeft(this);
     this.idleLeft = new ExplorerIdleLeft(this);
     this.jumpRight = new ExplorerJumpRight(this, 20, 32);
     this.jumpLeft = new ExplorerJumpLeft(this, -20, 32);
     this.idleJumpRight = new ExplorerIdleJumpRight(this, 20, 32);
     this.idleJumpLeft = new ExplorerIdleJumpLeft(this, 20, 32);
     this.state = new ExplorerIdleRight(this);
 }