public override void update(GameTime gameTime, InputListener input) { if (input.isKeyPressed(Keys.Tab)) { isActive = !isActive; } if (isActive) { } }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { // TODO: Add your initialization logic here this.IsMouseVisible = true; screen = new Vector2(1600, 900); graphics.PreferredBackBufferHeight = (int)screen.Y; graphics.PreferredBackBufferWidth = (int)screen.X; graphics.ApplyChanges(); input = new InputListener(); base.Initialize(); }
public void logic(GameTime gameTime, InputListener input) { foreach (Component component in common) { component.update(gameTime, input); } foreach (Component component in addComponent) { create(component); } foreach (Component component in remComponent) { destroy(component); } addComponent.Clear(); remComponent.Clear(); }
abstract public void update(GameTime gameTime, InputListener input);
public override void update(GameTime gameTime, InputListener input) { }
public override void update(GameTime gameTime, InputListener input) { if (input.isKeyPressed(Keys.Enter)) exit = true; }