public void Add(GunBasic gun) { if (Guns == null) { Guns = new List <GunBasic>(1); } Guns.Add(gun); gun.SetParent(this); }
public void SetGun(GunBasic gun) { if (Guns == null) { Guns = new List <GunBasic>(1); Guns.Add(gun); } else { Guns[0] = gun; } if (gun != null) { gun.SetParent(this); } }