/// <summary>
        /// Creates a new WorldState instance.
        /// </summary>
        /// <param name="device">A GraphicsDevice used for rendering.</param>
        /// <param name="worldPxWidth">Width of world in pixels.</param>
        /// <param name="worldPxHeight">Height of world in pixels.</param>
        /// <param name="world">A World instance.</param>
        public WorldState(GraphicsDevice device, float worldPxWidth, float worldPxHeight, World world)
        {
            this.Device = device;
            this.World = world;
            this.WorldCamera = new WorldCamera(device);

            WorldSpace = new WorldSpace(worldPxWidth, worldPxHeight, this);
            Zoom = WorldZoom.Near;
            Rotation = WorldRotation.TopLeft;
            Level = 1;
        }
Esempio n. 2
0
        public WorldState(GraphicsDevice device, float worldPxWidth, float worldPxHeight, World world)
        {
            this.Device = device;
            this.World = world;
            //this.OrthographicCamera = new OrthographicCamera(device, Vector3.Zero, Vector3.Zero, Vector3.Up);
            this.WorldCamera = new WorldCamera(device);
            //OrthographicCamera.AspectRatioMultiplier = 0.96f;
            //OrthographicCamera.AspectRatioMultiplier = 1.03f;

            WorldSpace = new WorldSpace(worldPxWidth, worldPxHeight, this);
            Zoom = WorldZoom.Near;
            Rotation = WorldRotation.TopRight;
        }