Exemplo n.º 1
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            engine = new Engine(new Point(1600, 900), new Point(10, 10));
            drawEngine = new DrawEngine(engine, new Vector2(1600.0f, 900.0f),
                new Vector2(1280.0f, 720.0f), false, graphics);
            drawEngine.AddExtension(new BasicDrawEngine(drawEngine));
            engine.AddEngineExt(drawEngine);
            frameCounter = new FrameCounter();
        }
Exemplo n.º 2
0
        public ChunkManager(Engine engine, Point chunkSize, Point numberOfChanks)
        {
            this.chunkSize = chunkSize;
            this.numberOfChanks = numberOfChanks;

            this.chunks = new Chunk[numberOfChanks.X, numberOfChanks.Y];
            for (int x = 0; x < numberOfChanks.X; ++x)
            {
                for (int y = 0; y < numberOfChanks.Y; ++y)
                {
                    chunks[x, y] = new Chunk();
                }
            }
        }
Exemplo n.º 3
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            engine = new Engine(new Point(1600, 900), new Point(10, 10));
            drawEngine = new DrawEngine(engine, new Vector2(1600.0f, 900.0f),
                new Vector2(1600.0f, 450.0f), false, graphics);
            drawEngine.AddExtension(new BasicDrawEngine(drawEngine));
            viewport1 = new PlumGine2D.Graphics.Viewport(
                new Rectangle(0, 0, 800, 900), new Point(1600, 900));
            viewport2 = new PlumGine2D.Graphics.Viewport(
                new Rectangle(800, 0, 800, 900), new Point(800, 900));

            drawEngine.AddViewport(viewport1);
            drawEngine.AddViewport(viewport2);

            engine.AddEngineExt(drawEngine);
            frameCounter = new FrameCounter();
        }