private void StripFrom(EClothingType ctype) { if (Worn.ContainsKey(ctype)) { // We're wearing something GameObject.Destroy(Worn[ctype].Instance); Worn[ctype].Instance = null; Worn.Remove(ctype); } }
void OpenDrawer(EClothingType drawer) { bool success = WardrobeManager.SetView(drawer); if (success) { // If this failed (i.e. we don't have any clothing of that type), don't change modes this.CurrentState = EUIState.DRAWER; Seamstress.OpenDrawer(); } MarkActivity(); }
public bool SetView(EClothingType drawer) { if (this.Worn.ContainsKey(drawer)) { // We're already wearing something from this drawer WardrobeSelection curr = Worn[drawer]; this.CurrentSelection = new WardrobeSelection(curr.ClothingType.Value, curr.Index); } else { if (this.KnownClothingByType.ContainsKey(drawer)) { this.CurrentSelection = new WardrobeSelection(drawer); } } RefreshView(); return(CurrentSelection.Valid); }
public WardrobeSelection(EClothingType t, int i, GameObject inst) { this.ClothingType = t; this.Index = i; this.Instance = inst; }
public WardrobeSelection(EClothingType t, int i) { this.ClothingType = t; this.Index = i; this.Instance = null; }