public AttackControl(Game game, GameInput gameInput) : base(game) { this.gameInput = gameInput; AddInputControls(); millisecondsBetweenAttacks = 500; millisecondsSinceLastAttack = 500; }
public GameControls(Game game) : base(game) { gameInput = new GameInput(); CrossControl = new CrossControl(game, gameInput); AttackControl = new AttackControl(game, gameInput); controls = new List<DrawableGameComponent> {CrossControl, AttackControl}; }
public MenuScene(Game game) : base(game) { Type = SceneType.Menu; // We need at least 80 pixels between the menu item // The current algorithm for touch detection (that is calculated from the font) requires it (otherwise the game may detect that both items were clicked) gameInput = new GameInput(); MenuItem menuItemStart = new MenuItem(game, "Start", new Vector2(320, 300), Color.White); menuItemStart.Clicked += new Action(menuItemStart_Clicked); MenuItem menuItemOptions = new MenuItem(game, "Options", new Vector2(295, 380), Color.White); menuItemOptions.Clicked += new Action(menuItemOptions_Clicked); menuItems = new List<MenuItem>(); menuItems.Add(menuItemStart); menuItems.Add(menuItemOptions); foreach (MenuItem menuItem in menuItems) SceneComponents.Add(menuItem); }
public CrossControl(Game game, GameInput gameInput) : base(game) { this.gameInput = gameInput; AddInputControls(); }