public void RemovePart(Gun.Part part) { if (_parts.Contains(part)) { _parts.Remove(part); HandleOnItemsChanged(); } }
public bool AddPart(Gun.Part part) { if (_parts.Count < _numOfItems) { _parts.Add(part); HandleOnItemsChanged(); return(true); } return(false); }
// ************************** public Model.Gun.Part GetPart() { var part = new Model.Gun.Part(); part.PrefabName = _uiPrefab.name; part.Position = new Vector3(); part.Rotation = new Vector3(); part.Stats = Roll(); return(part); }
public void SetPart(Model.Gun.Part part) { _part = part; _text.text = part.PrefabName; }