Dabrorius.MonoPunk.Engine.Engine C# (CSharp) Method

Engine() public method

public Engine ( int width, int height, string assetsDirectory = "./" ) : System
width int
height int
assetsDirectory string
return System
        public Engine(int width, int height, string assetsDirectory = "./")
            : base()
        {
            MP.Width = width;
            MP.Height = height;
            MP.currentWorld = new World ();

            Window.AllowUserResizing = true;

            graphics = new GraphicsDeviceManager (this);
            graphics.SynchronizeWithVerticalRetrace = false;
            graphics.PreferredBackBufferWidth = MP.Width;
            graphics.PreferredBackBufferHeight = MP.Height;
            graphics.ApplyChanges ();

            this.IsFixedTimeStep = false;
            //graphics.IsFullScreen = true;

            //graphics.ApplyChanges ();
            Content.RootDirectory = assetsDirectory;
            Engine.currentEngine = this;
        }