Example #1
0
 public void RemovePart(Gun.Part part)
 {
     if (_parts.Contains(part))
     {
         _parts.Remove(part);
         HandleOnItemsChanged();
     }
 }
Example #2
0
        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);
    }
Example #4
0
 public void SetPart(Model.Gun.Part part)
 {
     _part      = part;
     _text.text = part.PrefabName;
 }