public override void Initialize() { _touchService = Game.Services.GetService<ITouchService>(); _spriteBatch = Game.Services.GetService<SpriteBatch>(); _gameState = Game.Services.GetService<GameState>(); _reactionBar = new ProgressBar(Game, @"Textures\UI\PressSequenceBarFiller", @"Textures\UI\PressSequenceBarEmpty") { Max = ReactionProgressComponent.InitialProgressValue }; _reactionBar.Initialize(); base.Initialize(); }
public override void Initialize() { _gameState = _game.Services.GetService<GameState>(); _inputDisplay = new InputSequenceDisplay(Game); _inputDisplay.Initialize(); // Game Over _gameOver = new GameOver(Game); _gameOver.Initialize(); // Level finished _levelFinished = new LevelFinished(Game); _levelFinished.Initialize(); _inventoryComponent = new InventoryComponent(Game); _inventoryComponent.Initialize(); _heartbeatComponent = new HeartbeatComponent(Game); _heartbeatComponent.Initialize(); // Player health _playerHealthBar = new ProgressBar(Game, @"Textures\UI\Health", @"Textures\UI\HealthVessel") { DestinationRectangle = new Rectangle(64, 24, 250, 24), Max = _gameState.Player.MaxHealth }; _playerHealthBar.Initialize(); base.Initialize(); }