コード例 #1
0
ファイル: Tortoise2d.cs プロジェクト: ocdy1001/Tortoise2D
        public Tortoise2d(string windowTitle, int windowWidth, int windowHeight, int unitsOnX, int unitsOnY, int renderSize, int stateSize)
        {
            Console.WriteLine(author);
            WWidth          = windowWidth;
            WHeight         = windowHeight;
            WTitle          = windowTitle;
            this.X          = 100;
            this.Y          = 100;
            References.game = this;

            Title      = WTitle;
            ClientSize = new System.Drawing.Size(WWidth, WHeight);
            Debug.PrintEngine("Window: W:" + ClientSize.Width + ",H:" + ClientSize.Height);
            //this.WindowState = WindowState.Fullscreen;

            this.renderSize = renderSize;
            this.stateSize  = stateSize;

            grid     = new Grid(unitsOnX, unitsOnY, WWidth, WHeight);
            CX       = unitsOnX;
            CY       = unitsOnY;
            textures = new TextureManager();
            renderer = new Renderer(this, WWidth, WHeight + 44, renderSize, 1000, textures, grid);
            layers   = new LayerManager(10);
            input    = new PCInput(this);
            states   = new GameStateManager(this, stateSize);
            camera   = new Camera(this, 0, 0);
            sound    = new SoundManager(1000);
            fps      = new FPS();

            matrix = new Math.Matrix2();
            matrix.SetAll(0);
            random = new Random();

            References.renderer = renderer;
            References.input    = input;
            References.textures = textures;
            References.layers   = layers;
            References.states   = states;
            References.grid     = grid;
            References.camera   = camera;
            References.sound    = sound;
            References.matrix   = matrix;
            References.random   = random;
            References.fps      = fps;

            Debug.DEBUG        = true;
            Debug.ENGINE_DEBUG = true;
        }
コード例 #2
0
ファイル: Tortoise2d.cs プロジェクト: ocdy1001/Tortoise2D
        public Tortoise2d(string windowTitle, int windowWidth, int windowHeight, int unitsOnX, int unitsOnY, int renderSize, int stateSize)
        {
            Console.WriteLine(author);
            WWidth = windowWidth;
            WHeight = windowHeight;
            WTitle = windowTitle;
            this.X = 100;
            this.Y = 100;
            References.game = this;

            Title = WTitle;
            ClientSize = new System.Drawing.Size(WWidth, WHeight);
            Debug.PrintEngine("Window: W:" + ClientSize.Width + ",H:" + ClientSize.Height);
            //this.WindowState = WindowState.Fullscreen;

            this.renderSize = renderSize;
            this.stateSize = stateSize;

            grid = new Grid(unitsOnX, unitsOnY, WWidth, WHeight);
            CX = unitsOnX;
            CY = unitsOnY;
            textures = new TextureManager();
            renderer = new Renderer(this, WWidth, WHeight + 44, renderSize, 1000, textures, grid);
            layers = new LayerManager(10);
            input = new PCInput(this);
            states = new GameStateManager(this, stateSize);
            camera = new Camera(this, 0, 0);
            sound = new SoundManager(1000);
            fps = new FPS();

            matrix = new Math.Matrix2();
            matrix.SetAll(0);
            random = new Random();

            References.renderer = renderer;
            References.input = input;
            References.textures = textures;
            References.layers = layers;
            References.states = states;
            References.grid = grid;
            References.camera = camera;
            References.sound = sound;
            References.matrix = matrix;
            References.random = random;
            References.fps = fps;

            Debug.DEBUG = true;
            Debug.ENGINE_DEBUG = true;
        }