示例#1
0
文件: Game1.cs 项目: xgrommx/Ocean
        protected override void LoadContent()
        {
            lightDirection.Normalize();


            YrotationSpeed = (float)graphics.PreferredBackBufferWidth / 100000.0f;
            XrotatiobSpeed = (float)graphics.PreferredBackBufferHeight / 120000.0f;


            camera    = new Camera(graphics.GraphicsDevice);
            ocean     = new Ocean(Content.Load <Model>("Models/ocean"), Content.Load <Effect>("Effects/SimpleOceanShader"), Content.Load <Texture2D>("Textures/water"), Content.Load <Texture2D>("Textures/wavesbump"), lightDirection);
            sky       = new SkyDome(Content.Load <Model>("Models/dome"), Content.Load <Texture2D>("Textures/SkyDay"));
            lensFlare = new LensFlareComponent(new SpriteBatch(graphics.GraphicsDevice), Content, graphics.GraphicsDevice);


            screenCenter = new Vector2(graphics.GraphicsDevice.Viewport.Width, graphics.GraphicsDevice.Viewport.Height) / 2;
        }
示例#2
0
文件: Game1.cs 项目: noamg97/Ocean
        protected override void LoadContent()
        {
            lightDirection.Normalize();

            YrotationSpeed = (float)graphics.PreferredBackBufferWidth / 100000.0f;
            XrotatiobSpeed = (float)graphics.PreferredBackBufferHeight / 120000.0f;

            camera = new Camera(graphics.GraphicsDevice);
            ocean = new Ocean(Content.Load<Model>("Models/ocean"), Content.Load<Effect>("Effects/SimpleOceanShader"), Content.Load<Texture2D>("Textures/water"), Content.Load<Texture2D>("Textures/wavesbump"), lightDirection);
            sky = new SkyDome(Content.Load<Model>("Models/dome"), Content.Load<Texture2D>("Textures/SkyDay"));
            lensFlare = new LensFlareComponent(new SpriteBatch(graphics.GraphicsDevice), Content, graphics.GraphicsDevice);

            screenCenter = new Vector2(graphics.GraphicsDevice.Viewport.Width, graphics.GraphicsDevice.Viewport.Height) / 2;
        }