Exemplo n.º 1
0
        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;
            }
        }
Exemplo n.º 2
0
        protected override void Initialize()
        {
            base.Initialize();
            ClothStats stats = GetClothStats();

            armorLife = stats.ArmorIncrement;
        }
Exemplo n.º 3
0
        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");
        }
Exemplo n.º 4
0
        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");
        }
Exemplo n.º 5
0
        public ClothStats GetClothStats()
        {
            if (Stats is ClothStats)
            {
                return(Stats as ClothStats);
            }

            ClothStats defect = new ClothStats();

            Stats = defect;
            return(defect);
        }