コード例 #1
0
ファイル: EntityActions.cs プロジェクト: Akster009/thesisrpg
        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);
        }
コード例 #2
0
 public void AddProjectile(PProjectile projectile)
 {
     Pentities.Add(projectile);
 }