Esempio n. 1
0
 string GetName(Weapon w)
 {
     Type t = w.GetType();
     if(t==typeof(IonPulseCannon))
     {
         return "Ion";
     }
     else if(t==typeof(RailGun))
     {
         return "Rail";
     }
     else if (t == typeof(HomingMissileLauncher))
     {
         return "Rockets";
     }
     else if (t == typeof(DisruptorCannon))
     {
         return "Disruptor";
     }
     else if (t == typeof(LaserCannon))
     {
         return "Laser";
     }
     else if (t == typeof(PulseLaserCannon))
     {
         return "PulseLaser";
     }
     else if (t == typeof(MineLayer))
     {
         return "Mines";
     }
     else
     {
         return t.Name;
     }
 }
Esempio n. 2
0
 public Slot(Weapon w, Vector3 p, Quaternion q, int group)
 {
     Weapon = w;
     Position = p;
     Orientation = q;
     Group = group;
 }
Esempio n. 3
0
 string GetAmmo(Weapon w)
 {
     if (w.ProjectileType != null && w.AmmoSource!=null)
         return w.AmmoSource.Count(w.ProjectileType).ToString();
     else
         return "";
 }