public Rocket(Vector2 position, Vector2 speed, float rotation) { Position = position; Size = 16; Speed = speed + new Vector2(7f * Maf.Sin(rotation), -7f * Maf.Cos(rotation)); Rotation = rotation; }
public override void Shoot(World world) { var kickRocket = 20f; var speedRocket = 14.9f; PlasmaBullet plasmaBullet = new PlasmaBullet() { Size = 10, Position = Owner.Position + kickRocket * new Vector2(Maf.Sin(Owner.Rotation), -Maf.Cos(Owner.Rotation)), Speed = Owner.Speed + speedRocket * new Vector2(Maf.Sin(Owner.Rotation), -Maf.Cos(Owner.Rotation)) }; world.Add(plasmaBullet); }
public override void Shoot(World world) { Rocket rocket1 = new Rocket(Owner.Position + new Vector2(-40f * Maf.Cos(Owner.Rotation), -40f * Maf.Sin(Owner.Rotation)), Owner.Speed, Owner.Rotation); Rocket rocket2 = new Rocket(Owner.Position + new Vector2(40f * Maf.Cos(Owner.Rotation), 40f * Maf.Sin(Owner.Rotation)), Owner.Speed, Owner.Rotation); world.Add(rocket1); world.Add(rocket2); }