public void Hide(ClothItem item) { mesh.enabled = false; if (HideMask) { foreach (string bmask in BodyMasks) { foreach (BodyMaskManager manager in maskManagers) { if (manager.Show(bmask)) { break; } } } } ClothStats sts = item.GetClothStats(); partsToProtect = ragdoll.getBodyParts(sts.ProtectBodyParts); foreach (BodyPart bp in partsToProtect) { bp.ArmorItem = null; } }
protected override void Initialize() { base.Initialize(); ClothStats stats = GetClothStats(); armorLife = stats.ArmorIncrement; }
public override void Drop(CharController character, Transform itemTransform, bool selected) { base.Drop(character, itemTransform, selected); ClothStats stats = GetClothStats(); this.usingChar = character; character.inventary.HideCloth(stats.ItemViewerName, this); character.Consume(-armorLife, "armor"); }
public override void Use(CharController character) { base.Use(character); ClothStats stats = GetClothStats(); this.usingChar = character; character.inventary.ShowCloth(stats.ItemViewerName, this); character.Consume(armorLife, "armor"); }
public ClothStats GetClothStats() { if (Stats is ClothStats) { return(Stats as ClothStats); } ClothStats defect = new ClothStats(); Stats = defect; return(defect); }