Beispiel #1
0
 public void Reset()
 {
     successful = false;
     reverse = false;
     start = true;
     pause = false;
     gameOver = false;
     Camera = null;
     Game.Components.Remove(gameScore);
     Game.Components.Remove(countDown);
     countDown = null;
     Game.Components.Remove(bobEntity);
     space.Remove(stageMesh);
     Game.Components.Remove(stageMod);
     space.Remove(bobBox);
     Game.Components.Remove(bgMod);
     Game.Components.Remove(gamemenu);
     songInstance.Stop();
     if (engineInstance.State == SoundState.Playing)
     {
         engineInstance.Stop();
     }
     if (hyperspaceInsance.State == SoundState.Playing)
         hyperspaceInsance.Stop();
     Initialize();
 }
Beispiel #2
0
        public override void Initialize()
        {
            start = true;

            pause = false;

            gameOver = false;

            successful = false;

            reverse = false;

            Camera = new Camera(this, new Vector3(0, 0, -1),Vector3.Zero, 0.09f);

            //Camera = new Camera(this, new Vector3(bobBox.Position.X, bobBox.Position.Y, bobBox.Position.Z-1),bobBox.Position, 0.09f);

            prevStatePauseKey = false;

            base.Initialize();
        }