public WorldObject(Vector2 position, Vector2 size, Texture2D texture, Room room) { this.position = position; this.size = size; this.texture = texture; this.room = room; }
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(); }
public Player(Vector2 position, Room room) : base(position, Vector2.One * 32, TextureBin.Pixel, room) { }
/// <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); }