Exemplo n.º 1
0
        protected override void Initialize()
        {
            StaticClassSerializer.Load(typeof(PlayerData), "data.bin");

            // Manage inputs like keyboard or gamepad
            Components.Add(new InputHandler(this));

            // Display FPS at the top left screen's corner
            Components.Add(new FrameRateCounter(this));

            _stateManager = new GameStateManager(this);
            Components.Add(_stateManager);

            // Screens
            TitleScreen             = new TitleScreen(this, _stateManager);
            DebugScreen             = new DebugScreen(this, _stateManager);
            PatternTestScreen       = new PatternTestScreen(this, _stateManager);
            GameConfigurationScreen = new GameConfigurationScreen(this, _stateManager);
            GameplayScreen          = new GameplayScreen(this, _stateManager);
            LeaderboardScreen       = new LeaderboardScreen(this, _stateManager);
            ImprovementScreen       = new ImprovementScreen(this, _stateManager);
            GameOverScreen          = new GameOverScreen(this, _stateManager);
            OptionsScreen           = new OptionsScreen(this, _stateManager);
            KeyboardInputsScreen    = new KeyboardInputsScreen(this, _stateManager);
            GamepadInputsScreen     = new GamepadInputsScreen(this, _stateManager);

            _stateManager.ChangeState(TitleScreen);

            ParticleManager = new ParticleManager <ParticleState>(1024 * 20, ParticleState.UpdateParticle);

            base.Initialize();
        }
Exemplo n.º 2
0
        protected override void Initialize()
        {
            // We get all map files to store name + md5 checksum in a dictionary
            MapLoader.LoadMapFiles();

            // We load player info
            StaticClassSerializer.Load(typeof(PlayerInfo), "PlayerInfo.xml", false);

            // Volume
            MediaPlayer.Volume       = Config.MusicVolume;
            SoundEffect.MasterVolume = Config.SoundVolume;

            _timer = new Stopwatch();
            _timer.Start();

            base.Initialize();
        }
Exemplo n.º 3
0
        protected override void Initialize()
        {
            StaticClassSerializer.Load(typeof(PlayerData), "data.bin");

            base.Initialize();
        }