public BossModeService(WindowsInputHandler inputHandler, List<TouchSequenceEntry> combinationToKillBoss, GameState gameState) { _inputHandler = inputHandler; _gameState = gameState; _combinationToKillBoss = combinationToKillBoss; _rhytmEngine = _gameState.Game.Services.GetService<RhythmEngine>(); }
public override void Initialize() { _spriteBatch = Game.Services.GetService<SpriteBatch>(); _rhythmEngine = Game.Services.GetService<RhythmEngine>(); base.Initialize(); }
public void Initialize(Game game) { _comboUpSound = game.Content.Load<SoundEffect>("Sounds\\Combo").CreateInstance(); _comboBreakerSound = game.Content.Load<SoundEffect>(@"Sounds\ComboBreaker").CreateInstance(); _rhythmEngine = game.Services.GetService<RhythmEngine>(); PlayMelody(true); }
public RhythmMelodyPlayer(RhythmEngine engine) { _engine = engine; }
public LevelFinishedScript(Game game) { _rhythmEngine = game.Services.GetService<RhythmEngine>(); }
public override void LoadContent() { var game = ScreenManager.Game; GameState = game.Services.GetService<GameState>(); // ********************************************************* // DO NOT forget to remove all added here // services and game components on UnloadContent // ********************************************************* var services = ScreenManager.Game.Services; services.AddService(ScreenManager); // Rhythm engine _rhythmEngine = new RhythmEngine(ScreenManager.Game); _rhythmEngine.Initialize(); services.AddService(_rhythmEngine); _reactionCatalog = new ReactionsCatalog(); services.AddService(_reactionCatalog); // Input _touchService = new TouchService(); services.AddService(_touchService); _inputHandler = new WindowsInputHandler(ScreenManager.Game, this); _inputHandler.Initialize(); _comboController = new ComboController(100); GameState.Combo = _comboController; GameState.Player.AddScript(new CheckForPickableObjectsScript(game)); // Resources services.AddService(new ResourceBuilder(new InventoryMappingService())); Level.Initialize(ScreenManager.Game, ScreenManager.SpriteBatch, GameState.Camera, GameState); _comboController.Melodies.Clear(); _comboController.Melodies[0] = new ComboLevelMelody(ScreenManager.Game.Content.Load<SoundEffect>(Level.MelodyAsset)); _comboController.Initialize(ScreenManager.Game); GameState.Camera.Initialize(game); GameState.Player.Initialize(game, ScreenManager.SpriteBatch); _levelUI = new LevelUI(ScreenManager.Game); _levelUI.Initialize(); // Effects _bloom = new BloomComponent(ScreenManager.Game); _bloom.Initialize(); services.AddService(_bloom); InitializeReactions(); WireUpEvents(); ApplyDefaultMatchingStrategy(); base.LoadContent(); }
public GameOverScript(Game game) { _screenManager = game.Services.GetService<ScreenManager>(); _rhythmEngine = game.Services.GetService<RhythmEngine>(); }