Пример #1
0
 public ItemManager()
 {
     Instance = this;
 }
Пример #2
0
        void Reset()
        {
            currentFade = Color.White * 0f;
            fadeIn = 1f;

            particleManager = new ParticleManager();
            particleManager.LoadContent(Content);

            enemyManager = new EnemyManager();
            enemyManager.LoadContent(Content, GraphicsDevice);
            enemyManager.Spawn(gameMap, planeFloorHight);

            itemManager = new ItemManager();
            itemManager.LoadContent(Content, GraphicsDevice);

            itemManager.SpawnWorld(ItemType.Chute, ItemName.Chute, new Vector2((gameMap.Width * gameMap.TileWidth) - 650f, planeFloorHight-100f));
            itemManager.SpawnRandom(10, planeFloorHight);

            //pilot = new Dude(new Vector2(100,100), true);
            pilot = new Dude(new Vector2((gameMap.Width * gameMap.TileWidth) - 400f, planeFloorHight), true);
            pilot.Scale = 2f;
            pilot.LoadContent(Content, GraphicsDevice);

            gameCamera.Position = pilot.Position;

            //sfxEngine.Stop();
            sfxPanic.Stop();
            sfxWind.Stop();
            sfxPanic.Volume = 0.4f;
            sfxEngine.Volume = 1f;
            sfxWind.Volume = 0f;
            sfxEngine.Play();

            sfxRattle.Play();
            sfxRattle.Pause();

            gameState = GameState.Intro;
            introState = IntroState.FadeIn;
            introTimer = 0;

            planeRot = 0f;
            planeRotTarget = 0f;
            planeAltitude = 35000;
            gradHeight = 0f;
            outroCameraOffset = 0f;

            tutorialTime = 15000;

            doorOpen = false;
            doorFrame = 0;
            parachuteOpenAmount = 0f;
        }