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; } }
public Slot(Weapon w, Vector3 p, Quaternion q, int group) { Weapon = w; Position = p; Orientation = q; Group = group; }
string GetAmmo(Weapon w) { if (w.ProjectileType != null && w.AmmoSource!=null) return w.AmmoSource.Count(w.ProjectileType).ToString(); else return ""; }