Exemplo n.º 1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (KV game = new KV())
     {
         game.Run();
     }
 }
Exemplo n.º 2
0
 public Image(KV game, Vector2 position, string imagePath)
 {
     this.game = game;
     this.position = position;
     this.imagePath = imagePath;
     this.texture = this.game.Content.Load<Texture2D>(this.imagePath);
     this.rectangle = new Rectangle((int)this.position.X, (int)this.position.Y, this.texture.Width, this.texture.Height);
 }
Exemplo n.º 3
0
 public StairsRight(KV game, Vector2 position, int amountOfSteps)
 {
     this.game = game;
     this.position = position + new Vector2(-amountOfSteps * 16, amountOfSteps * 16);
     this.amountOfSteps = amountOfSteps;
     this.stairs = new List<StepRight>();
     this.LoadContent();
 }
Exemplo n.º 4
0
 //Constructor
 public Level(KV game, int levelIndex)
 {
     this.game = game;
     this.levelPath = String.Format(@"Content\Levels\{0}.txt", levelIndex);
     this.LoadAssets();
     //this.stairs = new StairsRight(this.game, new Vector2(400, 300), 5);
     this.stairsRight = new List<StairsRight>();
     this.DetectStairsRight();
 }
Exemplo n.º 5
0
        //Constructor
        public Explorer(KV 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, 70, 50);
            this.jumpLeft = new ExplorerJumpLeft(this, 70, 50);

            this.jumpIdleRight = new ExplorerJumpIdleRight(this, 70, 50);
            this.jumpIdleLeft = new ExplorerJumpIdleLeft(this, 70, 50);

            this.state = new ExplorerIdleRight(this);
        }
Exemplo n.º 6
0
 public Brick(KV game, Vector2 position, string imageName, char character)
     : base(game, position, @"Bricks\" + imageName)
 {
     this.character = character;
     this.imageName = imageName;
 }