Esempio n. 1
0
 public WorldObject(Vector2 position, Vector2 size, Texture2D texture, Room room)
 {
     this.position = position;
     this.size = size;
     this.texture = texture;
     this.room = room;
 }
Esempio n. 2
0
        protected override void Initialize()
        {
            base.Initialize();
            this.IsMouseVisible = true;
            this.graphics.PreferredBackBufferWidth = WINDOW_WIDTH;
            this.graphics.PreferredBackBufferHeight = WINDOW_HEIGHT;
            this.graphics.ApplyChanges();

            // Load the current room here.
            currentRoom = new RoomBattle();
        }
Esempio n. 3
0
 public Player(Vector2 position, Room room)
     : base(position, Vector2.One * 32, TextureBin.Pixel, room)
 {
 }
Esempio n. 4
0
        /// <summary>
        /// The main update method for the entire game.
        /// </summary>
        protected override void Update(GameTime gameTime)
        {
            Input.Update();

            if (Input.KeyboardTapped(Keys.Escape) && Input.IsKeyDown(Keys.Enter))
                this.Exit();

            if (Input.KeyboardTapped(Keys.F12) && Input.IsKeyDown(Keys.Enter))
                currentRoom = new RoomEditor();

            currentRoom.Update();

            base.Update(gameTime);
        }