private void OnHitEffect(ParticleEngine particleEngine, Vector2 position, int nrOfParticles, float scale, int timeToLive, Color color1, Color color2, Color color3)
        {
            particleEngine.EmitterLocation = new Vector2(position.X, position.Y);

            for (int i = 0; i < nrOfParticles; i++)
            {
                particleEngine.particles.Add(particleEngine.GenerateNewParticle(scale, timeToLive, color1, color2, color3));
            }
        }
        public ProjectileManager(ref CreepManager creepManager)
        {
            this.creepManager = creepManager;

            List<Texture2D> hitFrostParticles = new List<Texture2D>();
            hitFrostParticles.Add(TextureManager.p_FrostSmall);
            hitFrostParticles.Add(TextureManager.p_FrostLarge);
            hitFrostParticleEngine = new ParticleEngine(hitFrostParticles, new Vector2(800, 480));

            List<Texture2D> hitCannonParticles = new List<Texture2D>();
            hitCannonParticles.Add(TextureManager.p_Fragment1);
            hitCannonParticles.Add(TextureManager.p_Fragment2);
            hitCannonParticleEngine = new ParticleEngine(hitCannonParticles, new Vector2(800, 480));
        }
        public TowerManager(ref CreepManager creepManager, GraphicsDevice graphics)
        {
            this.graphics = graphics;
            backgroundLayer = new RenderTarget2D(graphics, 1600, 920);
            userInterface = new UserInterface(ref creepManager);

            this.creepManager = creepManager;
            projectileManager = new ProjectileManager(ref creepManager);

            List<Texture2D> smokeOpaque = new List<Texture2D>();
            smokeOpaque.Add(TextureManager.p_Smoke1_O);
            smokeOpaque.Add(TextureManager.p_Smoke2_O);
            smokeOpaque.Add(TextureManager.p_Smoke3_O);
            particleEngine = new ParticleEngine(smokeOpaque, new Vector2(800, 480));
        }
        public ProjectileManager(ref CreepManager creepManager)
        {
            this.creepManager = creepManager;

            List <Texture2D> hitFrostParticles = new List <Texture2D>();

            hitFrostParticles.Add(TextureManager.p_FrostSmall);
            hitFrostParticles.Add(TextureManager.p_FrostLarge);
            hitFrostParticleEngine = new ParticleEngine(hitFrostParticles, new Vector2(800, 480));

            List <Texture2D> hitCannonParticles = new List <Texture2D>();

            hitCannonParticles.Add(TextureManager.p_Fragment1);
            hitCannonParticles.Add(TextureManager.p_Fragment2);
            hitCannonParticleEngine = new ParticleEngine(hitCannonParticles, new Vector2(800, 480));
        }
Esempio n. 5
0
        public TowerManager(ref CreepManager creepManager, GraphicsDevice graphics)
        {
            this.graphics   = graphics;
            backgroundLayer = new RenderTarget2D(graphics, 1600, 920);
            userInterface   = new UserInterface(ref creepManager);

            this.creepManager = creepManager;
            projectileManager = new ProjectileManager(ref creepManager);

            List <Texture2D> smokeOpaque = new List <Texture2D>();

            smokeOpaque.Add(TextureManager.p_Smoke1_O);
            smokeOpaque.Add(TextureManager.p_Smoke2_O);
            smokeOpaque.Add(TextureManager.p_Smoke3_O);
            particleEngine = new ParticleEngine(smokeOpaque, new Vector2(800, 480));
        }
        public FrostOrb(Vector2 position, Texture2D texture, Creep targetCreep, int damage)
            : base(position, texture, targetCreep, damage)
        {
            speed = 5.0f;
            color = Color.White;
            radius = 128;
            slowedTimer = 4.0f;
            slowedModifier = 0.5f;

            targetPosition = targetCreep.GetPosition();
            direction = targetCreep.GetPosition() - position;
            direction.Normalize();

            List<Texture2D> frost = new List<Texture2D>();
            frost.Add(TextureManager.p_FrostSmall);
            frost.Add(TextureManager.p_FrostLarge);
            particleEngine = new ParticleEngine(frost, new Vector2(800, 480));
        }
Esempio n. 7
0
        public FrostOrb(Vector2 position, Texture2D texture, Creep targetCreep, int damage)
            : base(position, texture, targetCreep, damage)
        {
            speed          = 5.0f;
            color          = Color.White;
            radius         = 128;
            slowedTimer    = 4.0f;
            slowedModifier = 0.5f;

            targetPosition = targetCreep.GetPosition();
            direction      = targetCreep.GetPosition() - position;
            direction.Normalize();

            List <Texture2D> frost = new List <Texture2D>();

            frost.Add(TextureManager.p_FrostSmall);
            frost.Add(TextureManager.p_FrostLarge);
            particleEngine = new ParticleEngine(frost, new Vector2(800, 480));
        }
        private void OnHitEffect(ParticleEngine particleEngine, Vector2 position, int nrOfParticles, float scale, int timeToLive, Color color1, Color color2, Color color3)
        {
            particleEngine.EmitterLocation = new Vector2(position.X, position.Y);

            for (int i = 0; i < nrOfParticles; i++)
            {
                particleEngine.particles.Add(particleEngine.GenerateNewParticle(scale, timeToLive, color1, color2, color3));
            }
        }