Пример #1
0
 public void Restart()
 {
     _camera.Position      = new Vector3(0, 100, 0);
     _camera.Target        = Vector3.Zero;
     _camera.UpVector      = Vector3.UnitZ;
     _camera.FieldOfView   = MathHelper.PiOver2;
     _camera.NearClipPlane = 0.1f;
     _camera.FarClipPlane  = 10000f;
     _camera.AspectRatio   = Graphics.GraphicsDevice.DisplayMode.AspectRatio;
     _plane.Position       = Vector3.Zero;
     _asteroidField.Initialize();
     _asteroidField.LoadContent();
     _ship.Position   = new Vector3(95, 20, 0);
     CurrentGameState = new MainMenu(this, _buttonList, _bebasNeue, _click);
 }
Пример #2
0
        public void Initialize()
        {
            //MainMenu
            _buttonList = new List <Button>();

            //Options
            _buttonOptionsList = new List <Button>();

            //MainGame
            _camera               = new Camera();
            _camera.Position      = new Vector3(0, 100, 0);
            _camera.Target        = Vector3.Zero;
            _camera.UpVector      = Vector3.UnitZ;
            _camera.FieldOfView   = MathHelper.PiOver2;
            _camera.NearClipPlane = 0.1f;
            _camera.FarClipPlane  = 10000f;
            _camera.AspectRatio   = Graphics.GraphicsDevice.DisplayMode.AspectRatio;
            _plane          = new Gameboard();
            _plane.Position = Vector3.Zero;
            _asteroidField  = new AsteroidField(50, Content);
            _asteroidField.Initialize();
            _ship          = new Ship();
            _ship.Position = new Vector3(95, 20, 0);
        }