Creates a Terrarium mapping world given a target height and width. Used by the TerrariumDirectDrawGameView to render the background
        /// <summary>
        ///  Tell the game view to create a new world and reset the rendering
        ///  surfaces.
        /// </summary>
        /// <param name="xPixels">The number of world pixels</param>
        /// <param name="yPixels">The number of world pixels</param>
        /// <returns></returns>
        public RECT CreateWorld(int xPixels, int yPixels)
        {
            wld = new World();
            actualsize = wld.CreateWorld(xPixels, yPixels);

            ResetTerrarium();
            viewchanged = true;
            return actualsize;
        }
예제 #2
0
        /// <summary>
        ///  Tell the game view to create a new world and reset the rendering
        ///  surfaces.
        /// </summary>
        /// <param name="xPixels">The number of world pixels</param>
        /// <param name="yPixels">The number of world pixels</param>
        /// <returns></returns>
        public Rectangle CreateWorld(int xPixels, int yPixels)
        {
            wld = new World();
            _actualsize = wld.CreateWorld(xPixels, yPixels);

            ResetTerrarium();
            viewchanged = true;
            return ActualSize;
        }