private void SetupProjection()
        {
            _Screen screen = _Screen.GetInstance();

            this.projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4,
                                                                  screen.GetWidth() / (float)screen.GetHeight(),
                                                                  0.001f,
                                                                  1000);
        }
        public static _Screen GetInstance()
        {
            if (instance == null)
            {
                instance = new _Screen();
            }

            return(instance);
        }
示例#3
0
        protected override void Initialize()
        {
            this.world  = Matrix.Identity;
            this.screen = _Screen.GetInstance();
            this.screen.SetWidth(graphics.PreferredBackBufferWidth);
            this.screen.SetHeight(graphics.PreferredBackBufferHeight);

            this.camera = new _Camera();

            this.ground = new _Quad(GraphicsDevice, this, Color.SaddleBrown, new Vector3(0, 0, 0), new Vector2(120, 120), _WallOrientation.Up);

            this.house = new _House(GraphicsDevice, this);

            this.helicopter = new _Helicopter(GraphicsDevice, this);

            base.Initialize();
        }
示例#4
0
        protected override void Initialize()
        {
            this.world  = Matrix.Identity;
            this.screen = _Screen.GetInstance();
            this.screen.SetWidth(graphics.PreferredBackBufferWidth);
            this.screen.SetHeight(graphics.PreferredBackBufferHeight);

            this.camera = new _Camera();

            this.ground = new _Quad(GraphicsDevice, this, Color.SaddleBrown, new Vector3(0, 0, 0), new Vector2(70, 70), _WallOrientation.Up);
            //this.ground.CreateRotation("X", -90);

            this.house  = new _House(GraphicsDevice, this, new Vector3(0, 0, 0), new Vector2(0, 0));
            this.house1 = new _House(GraphicsDevice, this, new Vector3(-5, 0, 0), new Vector2(0, 0));

            base.Initialize();
        }
        protected override void Initialize()
        {
            this.world  = Matrix.Identity;
            this.screen = _Screen.GetInstance();
            this.screen.SetWidth(graphics.PreferredBackBufferWidth);
            this.screen.SetHeight(graphics.PreferredBackBufferHeight);

            this.camera = new _Camera();

            this.ground = new _Quad(GraphicsDevice, this, @"Textures\ground", @"Textures\groundSnow", new Vector3(0, 0, 0), new Vector2(500, 500), _WallOrientation.Up);

            this.house = new _House(GraphicsDevice, this);

            this.helicopter = new _Helicopter(GraphicsDevice, this);

            this.highMap = new _HM(this, GraphicsDevice);

            base.Initialize();
        }