public override void DoEffect(IGORR.Client.Logic.IMap map, Microsoft.Xna.Framework.Vector2 dir, Microsoft.Xna.Framework.Point position, string info) { if(smoke==null) smoke=ContentInterface.LoadTexture("dust"); Vector2 pos = new Vector2(position.X, position.Y); ParticleInfo pInfo = new ParticleInfo(); pInfo.collides = true; map.SetGlow(-2, pos, Color.Yellow, 40, false, 300); Vector2 sideWays = new Vector2(dir.Y, -dir.X); if (smoke != null) for (int x = 0; x < 80; x++) map.Particles.AddParticle(smoke, 0.7f, pos, 0.6f*dir*(float)_random.NextDouble() + (float)(-0.15f+0.3f*_random.NextDouble()) * sideWays, new Vector2(0, 100), (float)(_random.NextDouble() * Math.PI * 2), (float)(_random.NextDouble() * Math.PI * 2), (float)_random.NextDouble()*0.7f + 0.4f, pInfo); }
public override void DoEffect(IGORR.Client.Logic.IMap map, Microsoft.Xna.Framework.Vector2 dir, Microsoft.Xna.Framework.Point position, string info) { if(_smokeTex==null) _smokeTex=ContentInterface.LoadTexture("dust"); if(_fireTex==null) _fireTex=ContentInterface.LoadTexture("Boom"); if(_particleTex==null) _particleTex=ContentInterface.LoadTexture("expOrb"); Vector2 pos = new Vector2(position.X, position.Y); ParticleInfo pInfo = new ParticleInfo(); pInfo.collides = true; map.SetGlow(-2, pos, Color.LightYellow, 300, true, 500); if(_smokeTex!=null) for (int x = 0; x < 60; x++) map.Particles.AddParticle(_smokeTex, 1.2f, pos + new Vector2((float)_random.NextDouble() * 40 - 20, (float)_random.NextDouble() * 40 - 20), new Vector2((float)_random.NextDouble() * 40 - 20, (float)-(15 + _random.NextDouble() * 10)), new Vector2(0, 20), (float)(_random.NextDouble() * Math.PI * 2), (float)(_random.NextDouble() * Math.PI * 2), (float)_random.NextDouble() + 0.7f, pInfo); if (_fireTex != null) for (int x = 0; x < 12; x++) map.Particles.AddParticle(_fireTex, 0.7f, pos + new Vector2((float)_random.NextDouble() * 20 - 10, (float)_random.NextDouble() * 20 - 10), new Vector2((float)_random.NextDouble() * 40 - 20, (float)-(15 + _random.NextDouble() * 10)), new Vector2(0, 20), (float)(_random.NextDouble() * Math.PI * 2), (float)(_random.NextDouble() * Math.PI * 2), (float)_random.NextDouble() * 0.5f + 0.7f, pInfo); if (_particleTex != null) for (int x = 0; x < 6; x++) map.Particles.AddParticle(_particleTex, 0.8f, pos, new Vector2((float)_random.NextDouble() * 600 - 300, (float)_random.NextDouble() * 600 - 300), new Vector2(0, 0), (float)(_random.NextDouble() * Math.PI * 2), (float)(_random.NextDouble() * Math.PI * 2), (float)_random.NextDouble() * 0.2f + 0.4f, pInfo); }