Ejemplo n.º 1
0
    public void RemoveClothing(Item_ModularClothing clothing)
    {
        if (!IsCharacterReady)
        {
            return;
        }

        clothing.ClearClothing(CharacterAvatar);
        Clothing.Remove(clothing);

        BuildCharacter();
    }
Ejemplo n.º 2
0
    bool IsOverlapping(Item_ModularClothing clothing, out Item_ModularClothing overlap)
    {
        foreach (UMATextRecipe r in clothing.Recipes)
        {
            foreach (Item_ModularClothing c in Clothing)
            {
                if (c.OverlapsOn(r.wardrobeSlot))
                {
                    overlap = c;
                    return(true);
                }
            }
        }

        overlap = null;
        return(false);
    }
Ejemplo n.º 3
0
    public void AddClothing(Item_ModularClothing clothing, bool buildCharacter)
    {
        if (!IsCharacterReady)
        {
            return;
        }

        if (IsOverlapping(clothing, out overlap))
        {
            RemoveClothing(overlap);
        }

        clothing.ApplyClothing(CharacterAvatar);
        Clothing.Add(clothing);

        if (buildCharacter)
        {
            BuildCharacter();
        }
    }
Ejemplo n.º 4
0
    public void AddClothing(Item_ModularClothing clothing)
    {
        if (!IsCharacterReady)
        {
            return;
        }

        if (!CharacterAvatar.isActiveAndEnabled)
        {
            if (IsOverlapping(clothing, out overlap))
            {
                RemoveClothing(overlap);
            }
        }

        clothing.ApplyClothing(CharacterAvatar);
        Clothing.Add(clothing);

        BuildCharacter();
    }