public static void Throw(PCharacter character) { PProjectile sword = new PProjectile("Sword", character.Game); sword.Owner = character; sword.Position = character.Position; sword.Velocity = new Vector2f(MathF.Cos((MathF.PI / 180) * (character.Display.State.facing + 90)) * 300, MathF.Sin((MathF.PI / 180) * (character.Display.State.facing + 90)) * 300); sword.Display.State.facing = character.Display.State.facing; character.Game.Pentities.Add(sword); }
public void AddProjectile(PProjectile projectile) { Pentities.Add(projectile); }