Exemplo n.º 1
0
        public Game1()
        {
            //Map.MAPSIZE = 513;
            //  ParticleSimple ps;
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";
            //camera =  new Camera(this);

            ls.Add(Sens.Droite);
            ls.Add(Sens.Gauche);
            camera.actucamera(ls);
            //graphics.ToggleFullScreen();
            graphics.PreferredBackBufferWidth = Tools.Quick.screen.Bounds.Width;
            graphics.PreferredBackBufferHeight = Tools.Quick.screen.Bounds.Height;
            Tools.Quick.bounds.X = graphics.PreferredBackBufferWidth;
            Tools.Quick.bounds.Y = graphics.PreferredBackBufferHeight;
            particleManager = new ParticleManager(this);
            Tools.Quick.game = this;
            mousy = new ActionMouse(this, camera);
            Tools.Quick.actmouse = mousy;
            water = new Water(this);
            skybox = new SkyBox(this);
            trees = new Trees(this);
            d = new Dungeon(25, this);

            Map map = new Map();
            actualGround = new Ground(this, map);

            world = new WorldSpace(this);
            dungeon = new WorldSpace(this);
        }
Exemplo n.º 2
0
        protected override void Initialize()
        {
            Console.WriteLine("Game: Initialize");

            actualGround.SourceMap.GenMap();

            this.IsMouseVisible = true;

            new ParticleInit(particleManager, this, this.Content);

            world.Add(water);
            world.Add(skybox);
            world.Add(trees);
            world.Add(actualGround);
            water.DrawOrder = 100;
            skybox.DrawOrder = 100;
            trees.DrawOrder = 100;
            actualGround.DrawOrder = 100;

            dungeon.Add(d);

            CurrentWorldSpace = world;
            world.Load();

            Console.WriteLine("Game: base.Initialize");
            base.Initialize();

            water.SetGround(actualGround);
            trees.SetGround(actualGround);
            trees.CreateTrees();
        }