Exemplo n.º 1
0
 public static Projectile Create(ProjectileType type)
 {
     var result = new Projectile();
     switch (type)
     {
         case ProjectileType.Torpedo:
             break;
         case ProjectileType.Skattershot:
             break;
         case ProjectileType.Hardshell:
             break;
         case ProjectileType.Nuke:
             break;
         case ProjectileType.Knockshot:
             break;
     }
     return result;
 }
Exemplo n.º 2
0
 public Projectile LaunchProjectile(int tubeNumber, Entity target)
 {
     if (this.ProjectileTubes[tubeNumber].ProjectileStatus == ProjectileStatus.Loaded && this.StarSystem == target.StarSystem)
     {
         var projectile = new Projectile(this.Position, this.Velocity);
         projectile.Target = target;
         this.StarSystem.AddEntity(projectile);
         PlaySound("MissileLaunch");
         return projectile;
     }
     return null;
 }