private void Update()
    {
        UpdateSliderMax();

        if (appearance && requiresUpdate)
        {
            appearance.UpdateAppearance();
            requiresUpdate = false;
        }

        if (appearance && generatedCommand)
        {
            var text = "!appearance ";
            text += (int)appearance.Gender + ",";
            text += Mathf.FloorToInt(hairSlider.value) + ",";
            text += Mathf.FloorToInt(hairColorSlider.value) + ",";
            text += Mathf.FloorToInt(eyeSlider.value) + ",";
            text += Mathf.FloorToInt(skinColorSlider.value) + ",";
            text += Mathf.FloorToInt(beardSlider.value) + ",";
            text += Mathf.FloorToInt(beardColorSlider.value) + ",";
            text += Mathf.FloorToInt(browSlider.value) + ",";
            text += Mathf.FloorToInt(browColorSlider.value) + ",";
            text += Mathf.FloorToInt(mouthSlider.value);
            generatedCommand.text = text;
        }
    }
示例#2
0
    public void EquipAll(IReadOnlyList <RavenNest.Models.Item> inventoryEquippedItems)
    {
        foreach (var appearanceItem in inventoryEquippedItems.Where(x => IsAppearanceItem(x.Type)))
        {
            EquipAppearanceItem(appearanceItem);
        }

        appearance.UpdateAppearance();

        foreach (var item in inventoryEquippedItems.Where(x => !IsAppearanceItem(x.Type)))
        {
            Equip(item);
        }
    }