Exemple #1
0
 //When UMA has finished loaded:
 private void UMAFemaleFinished(UMAData umaData)
 {
     // and finally lets give him a sword
     HumanoidStructure.AttachmentsAdd(humanf, "Item AngelicSword 01");
     // activate his sword
     HumanoidStructure.AttachmentSetActive(humanf, "Item AngelicSword 01");
     // Update UMA
     HumanoidBuilder.Update(myumaf.name, humanf, false, false);
 }
Exemple #2
0
    void Update()
    {
        // holster/ready weapon
        if (Input.GetKeyUp(KeyCode.Z))
        {
            if (HumanoidStructure.AttachcmentIsActive(human, "Item AngelicSword 01"))
            {
                HumanoidStructure.AttachmentSetDefault(human, "Item AngelicSword 01");
            }
            else
            {
                HumanoidStructure.AttachmentSetActive(human, "Item AngelicSword 01");
            }
            HumanoidBuilder.Update(myuma.name, human, false, false);
        }

        // toggle trousers with recoloring
        if (Input.GetKeyUp(KeyCode.X))
        {
            if (HumanoidStructure.WardrobeHasElement(human, "Male Jeans 01"))
            {
                HumanoidStructure.WardrobeRemove(human, "Male Jeans 01");
            }
            else
            {
                int c1 = Random.Range(1, 20);
                HumanoidStructure.WardrobeAdd(human, "Male Jeans 01", c1);
            }
            HumanoidBuilder.Update(myuma.name, human, true, false);
        }

        // change chainmail dye colors
        if (Input.GetKeyUp(KeyCode.C))
        {
            HumanoidStructure.WardrobeRemove(human, "MaleShirt 01");
            int c1 = Random.Range(1, 20);
            int c2 = Random.Range(1, 20);
            int c3 = Random.Range(1, 20);
            HumanoidStructure.WardrobeAdd(human, "MaleShirt 01", c1, c2, c3);
            HumanoidBuilder.Update(myuma.name, human, true, false);
        }
    }