示例#1
0
        public static _Screen GetInstance()
        {
            if (instance == null)
            {
                instance = new _Screen();
            }

            return(instance);
        }
示例#2
0
        public void SetupProjection()
        {
            _Screen screen = _Screen.GetInstance();

            this.projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4,
                                                                  screen.GetWidth() / (float)screen.GetHeight(),
                                                                  0.0000001f,
                                                                  1000);
        }
示例#3
0
        protected override void Initialize()
        {
            this.screen = _Screen.GetInstance();
            this.screen.SetWidth(graphics.PreferredBackBufferWidth);
            this.screen.SetHeight(graphics.PreferredBackBufferHeight);

            this.camera = new _Camera();

            this.triangle = new _Triangle(GraphicsDevice);

            base.Initialize();
        }