Пример #1
0
 public void Reset()
 {
     LoadContent();
     Camera.ResetCamera();
     MarioInfo.ResetTimer();
     MarioInfo.StartTimer();
 }
Пример #2
0
        public void LevelReset()
        {
            Vector2 restartPoint = GameObjectManager.restartPoint;

            spriteBatch = new SpriteBatch(GraphicsDevice);

            #region Load Textures
            MarioSpriteFactory.Instance.LoadAllTextures(Content);
            EnemySpriteFactory.Instance.LoadAllTextures(Content);
            ItemSpriteFactory.Instance.LoadAllTextures(Content);
            BlockSpriteFactory.Instance.LoadAllTextures(Content);
            FireballSpriteFactory.Instance.LoadAllTextures(Content);
            BackgroundSpriteFactory.Instance.LoadAllTextures(Content);
            PipeSpriteFactory.Instance.LoadAllTextures(Content);
            SoundManager.Instance.LoadAllSounds(Content);
            TextSpriteFactory.Instance.LoadAllTextures(Content);
            #endregion

            Mario         = new MarioObject(restartPoint);
            objectManager = new GameObjectManager(this, Mario);
            gamedata      = new GameData(objectManager);
            camera1       = new Camera();
            Camera.LimitationList.Add(3600);
            camera2         = new Camera2D(GraphicsDevice.Viewport);
            blackbackground = BackgroundSpriteFactory.Instance.CreateBlackBackgroundSprite();
            LevelLoader loader = new LevelLoader(objectManager, Mario);
            loader.Load();
            keyboard = new KeyboardControls(this, Mario);
            gamepad  = new GamePadControls(this, Mario);
            Camera.SetCamera(new Vector2(restartPoint.X - 16 * 5, 0));
            MarioInfo.ClearTimer();
            MarioInfo.ResetTimer();
            MarioInfo.StartTimer();
        }
Пример #3
0
 public void Reset()
 {
     LoadContent();
     Camera.ResetCamera();
     CoinSystem.Instance.ResetCoin();
     ScoringSystem.ResetScore();
     MarioInfo.ResetTimer();
     MarioInfo.StopTimer();
 }