public void Stop() { if (playState != PlayState.Stopped) { // stop game playState = PlayState.Stopped; PhysicsObject.ForceStaticMesh = true; PhysicsObject.DisableMass = true; // reload world Stage.EditorReloadStage(); activeManipulator = new Manipulator(); activeManipulator.Initialize(content, GraphicsDevice); //stop the theme song cause that is annoying AudioQB aQB = Stage.ActiveStage.GetQB<AudioQB>(); aQB.PauseTheme(); // set to freecam CameraQB cameraQB = Stage.ActiveStage.GetQB<CameraQB>(); cameraQB.StartFreeCam(); } }
public void Pause() { if (playState == PlayState.Playing) { // pause game playState = PlayState.Paused; activeManipulator = new Manipulator(); activeManipulator.Initialize(content, GraphicsDevice); // push the freecam CameraQB cameraQB = Stage.ActiveStage.GetQB<CameraQB>(); cameraQB.StartFreeCam(); } }
public void StartRotate() { if (playState == PlayState.Stopped) { Actor selectedActor = null; if (activeManipulator != null) selectedActor = activeManipulator.selectedActor; activeManipulator = new RotateManipulator(); ((RotateManipulator)activeManipulator).modelDrawer = new BEPUphysicsDrawer.Models.InstancedModelDrawer(GraphicsDevice, Services); activeManipulator.Initialize(content, GraphicsDevice); activeManipulator.selectedActor = selectedActor; } }
public void LoadStage(string filename) { Stop(); activeManipulator = null; worldFile = filename; parms = ParameterSet.FromFile(worldFile); GameLib.Stage.EditorLoadStage(parms); //stop the theme song cause that is annoying AudioQB aQB = Stage.ActiveStage.GetQB<AudioQB>(); aQB.PauseTheme(); activeManipulator = new Manipulator(); activeManipulator.Initialize(content, GraphicsDevice); Stage.ActiveStage.GetQB<CameraQB>().StartFreeCam(); }