public void AddBlood(float x, float y, Vec2 vector, int count) { for (var i = 0; i < count; i++) { var velocity = GetV2((float)(Math.PI * 5d * Random.NextDouble()), (float)Random.NextDouble()); var part = new CircleParticle(15, 0.2f, x, y, velocity.X, velocity.Y, 0, 0.01f, 200); Particles.Add(part); } }
public void EmitParticle() { var c = new CircleParticle(this, "CircleParticle", RandomHelper.GetFloat(3, 10)); c.Body.Position = new Vector2(EntityGame.Viewport.Width / 2f - c.Body.Width / 2f, -20); c.Body.Angle = RandomHelper.GetFloat(0, MathHelper.TwoPi); c.Physics.Thrust(10f); c.Physics.Restitution = RandomHelper.GetFloat(1f, 2f); c.Render.Color = Color.Red; //c.Circle.Debug = true; }
public void EmitParticle() { var c = new CircleParticle(this, "CircleParticle", RandomHelper.GetFloat(3, 10)); c.Body.Position = new Vector2(EntityGame.Viewport.Width / 2f - c.Body.Width / 2f, -20); c.Body.Angle = RandomHelper.GetFloat(0, MathHelper.TwoPi); c.Physics.Thrust(10f); c.Physics.Restitution = RandomHelper.GetFloat(1f, 2f); c.Render.Color = Color.Red; //c.Circle.Debug = true; }