Esempio n. 1
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);

            ServiceContainer.registerServices(this);

            ContentManager = ServiceContainer.GetService <ContentManager>();
            frameCounter   = ServiceContainer.GetService <FrameCounter>();

            Content.RootDirectory = "Content";
        }
Esempio n. 2
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);

            graphics.IsFullScreen = false;
            graphics.PreferredBackBufferHeight = 720;
            graphics.PreferredBackBufferWidth = 1280;

            Content.RootDirectory = "Content";

            frameCounter = new FrameCounter();

            gameState = GameState.GS_RUNNING;
        }
Esempio n. 3
0
        protected override void LoadContent()
        {
            List <Texture2D> textures = new List <Texture2D>();

            //textures.Add(Content.Load<Texture2D>("Sprites/blackSmoke00"));
            //textures.Add(Content.Load<Texture2D>("Sprites/blackSmoke01"));
            //textures.Add(Content.Load<Texture2D>("Sprites/blackSmoke02"));
            //textures.Add(Content.Load<Texture2D>("Sprites/blackSmoke03"));
            //textures.Add(Content.Load<Texture2D>("Sprites/blackSmoke04"));
            //textures.Add(Content.Load<Texture2D>("Sprites/blackSmoke05"));
            //textures.Add(Content.Load<Texture2D>("Sprites/blackSmoke06"));
            //textures.Add(Content.Load<Texture2D>("Sprites/blackSmoke07"));
            //textures.Add(Content.Load<Texture2D>("Sprites/blackSmoke08"));
            //textures.Add(Content.Load<Texture2D>("Sprites/blackSmoke09"));
            //textures.Add(Content.Load<Texture2D>("Sprites/blackSmoke10"));
            //textures.Add(Content.Load<Texture2D>("Sprites/blackSmoke11"));
            //textures.Add(Content.Load<Texture2D>("Sprites/blackSmoke12"));
            //textures.Add(Content.Load<Texture2D>("Sprites/blackSmoke13"));
            //textures.Add(Content.Load<Texture2D>("Sprites/blackSmoke14"));
            //textures.Add(Content.Load<Texture2D>("Sprites/blackSmoke15"));
            //textures.Add(Content.Load<Texture2D>("Sprites/blackSmoke16"));
            //textures.Add(Content.Load<Texture2D>("Sprites/blackSmoke17"));
            //textures.Add(Content.Load<Texture2D>("Sprites/blackSmoke18"));
            //textures.Add(Content.Load<Texture2D>("Sprites/blackSmoke19"));
            //textures.Add(Content.Load<Texture2D>("Sprites/blackSmoke20"));
            //textures.Add(Content.Load<Texture2D>("Sprites/blackSmoke21"));
            //textures.Add(Content.Load<Texture2D>("Sprites/blackSmoke22"));
            //textures.Add(Content.Load<Texture2D>("Sprites/blackSmoke23"));
            //textures.Add(Content.Load<Texture2D>("Sprites/blackSmoke24"));
            textures.Add(Content.Load <Texture2D>("Sprites/particle_square"));

            _Random      = new Random();
            _SpriteBatch = new SpriteBatch(GraphicsDevice);
            quad         = new Quadtree(0, new Rectangle(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT));
            quad.CreateTest();

            _ParticleEngine = new ParticleEngine();
            _ParticleEngine.GenerateNewEmitter(500, textures, new Vector2(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2), ParticleEmitter.EmitterTypes.Sequential);
            _ParticleEngine.GenerateNewEmitter(_Random.Next(0, 500), textures, new Vector2(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2 + 200), ParticleEmitter.EmitterTypes.Sequential);

            _FrameCounter = new FrameCounter();
        }