public override bool Update(IMap map, float seconds) { bool alive = base.Update(map, seconds); Modules.ModuleManager.DoEffect(4, map, -this.Movement, this.Rect.Center, ""); map.SetGlow(_id, this.MidPosition, Microsoft.Xna.Framework.Color.Green, 20, false, 300); return alive; }
public void Boom(IMap map,Vector2 pos) { ParticleInfo info = new ParticleInfo(); info.collides = true; map.SetGlow(-2, pos, Color.LightYellow, 300, true, 500); for (int x = 0; x < 60; x++) AddParticle(_dustTex, 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, info); for (int x = 0; x < 12; x++) AddParticle(_boomTex, 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, info); for (int x = 0; x < 6; x++) AddParticle(_expTex, 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, info); }
public StaticLight(IMap map, Texture2D texture, Rectangle position, int id, Color c, int radius) : base(texture, position, id) { _map = map; _map.SetGlow(_id, this._position+new Vector2(8,8), c, radius, true); }