Exemplo n.º 1
0
        protected override void Initialize()
        {
            consoleHUD = new ConsoleHUD();

            spriteBatch = new SpriteBatch(graphics.GraphicsDevice);

            renderTarget         = new RenderTarget2D(graphics.GraphicsDevice, 800, 600, 1, SurfaceFormat.Color);
            refractionRenderTarg = new RenderTarget2D(graphics.GraphicsDevice, 800, 600, 1, SurfaceFormat.Color);
            reflectionRenderTarg = new RenderTarget2D(graphics.GraphicsDevice, 800, 600, 1, SurfaceFormat.Color);

            camera = new MouseCam();
            camera.SetPosition(new Vector3(1500f, 400f, 1500f));
            camera.rotation = new Vector3(0f, MathHelper.ToRadians(180f), 0f);

            //grid = new Grid(new Vector2(1000f, 1000f), 10, Color.Black, 1f, Vector3.Zero, new Vector3(0f, 0f, 0f));
            //water = new Water(new Vector2(40000f, 40000f), false);

            skybox = new Skybox();
            sun    = new Sun(342f, 335f);
            hud    = new HUD();

            InitFog();

            base.Initialize();

            settings = new HeightmapSettings();
            settings.Show();
        }
Exemplo n.º 2
0
        private void CheckPCInput()
        {
            KeyboardState ks = Keyboard.GetState();

            if ((ks.IsKeyDown(Keys.LeftControl) || ks.IsKeyDown(Keys.RightControl)))
            {
                if (ks.IsKeyDown(Keys.S) && (settings == null || !settings.Visible || !settings.Focused))
                {
                    if (settings == null)
                    {
                        settings         = new HeightmapSettings();
                        settings.Visible = true;
                    }
                    else if (!settings.Visible)
                    {
                        settings.Visible = true;
                    }
                    else if (!settings.Focused)
                    {
                        settings.Focus();
                        settings.BringToFront();
                    }

                    if (camera != null)
                    {
                        camera.SetState(Camera.State.Fixed);
                    }
                }
            }
        }
Exemplo n.º 3
0
		//HeightmapSettings appSettings;

		public CustomSize( HeightmapSettings settings ) {
			InitializeComponent();
			//appSettings = settings;
		}
Exemplo n.º 4
0
		protected override void Initialize() {
			consoleHUD = new ConsoleHUD();

			spriteBatch = new SpriteBatch( graphics.GraphicsDevice );

			renderTarget = new RenderTarget2D( graphics.GraphicsDevice, 800, 600, 1, SurfaceFormat.Color );
			refractionRenderTarg = new RenderTarget2D( graphics.GraphicsDevice, 800, 600, 1, SurfaceFormat.Color );
			reflectionRenderTarg = new RenderTarget2D( graphics.GraphicsDevice, 800, 600, 1, SurfaceFormat.Color );

			camera = new MouseCam();
			camera.SetPosition( new Vector3( 1500f, 400f, 1500f ) );
			camera.rotation = new Vector3( 0f, MathHelper.ToRadians( 180f ), 0f );

			//grid = new Grid(new Vector2(1000f, 1000f), 10, Color.Black, 1f, Vector3.Zero, new Vector3(0f, 0f, 0f));
			//water = new Water(new Vector2(40000f, 40000f), false);

			skybox = new Skybox();
			sun = new Sun( 342f, 335f );
			hud = new HUD();

			InitFog();

			base.Initialize();

			settings = new HeightmapSettings();
			settings.Show();
		}
Exemplo n.º 5
0
		private void CheckPCInput() {
			KeyboardState ks = Keyboard.GetState();

			if( ( ks.IsKeyDown( Keys.LeftControl ) || ks.IsKeyDown( Keys.RightControl ) ) ) {
				if( ks.IsKeyDown( Keys.S ) && ( settings == null || !settings.Visible || !settings.Focused ) ) {
					if( settings == null ) {
						settings = new HeightmapSettings();
						settings.Visible = true;
					} else if( !settings.Visible ) {
						settings.Visible = true;
					} else if( !settings.Focused ) {
						settings.Focus();
						settings.BringToFront();
					}

					if( camera != null )
						camera.SetState( Camera.State.Fixed );
				}
			}
		}
Exemplo n.º 6
0
        //HeightmapSettings appSettings;

        public CustomSize(HeightmapSettings settings)
        {
            InitializeComponent();
            //appSettings = settings;
        }