Esempio n. 1
0
    public void OnCharacterSettingsChange(CharacterSettings characterSettings)
    {
        if (characterSettings == null)
        {
            characterSettings = new CharacterSettings();
        }

        SetupCharacterData(characterSettings);
        // FIXME: this probably shouldn't send ALL of the character settings to everyone
        PlayerCustomisationMessage.SendToAll(gameObject, characterSettings);
    }
Esempio n. 2
0
    public void OnCharacterSettingsChange(CharacterSettings characterSettings)
    {
        if (characterSettings == null)
        {
            characterSettings = new CharacterSettings();
        }

        SetupCharacterData(characterSettings);
        //Torso
        PlayerCustomisationMessage.SendToAll(gameObject, characterSettings);
        //right leg
        //PlayerCustomisationMessage.SendToAll(gameObject, "body_rightleg", characterSettings.rightLegSpriteIndex, newColor, characterSettings);
        ////left leg
        //PlayerCustomisationMessage.SendToAll(gameObject, "body_leftleg", characterSettings.leftLegSpriteIndex, newColor, characterSettings);
        ////right arm
        //PlayerCustomisationMessage.SendToAll(gameObject, "body_rightarm", characterSettings.rightArmSpriteIndex, newColor, characterSettings);
        ////left arm
        //PlayerCustomisationMessage.SendToAll(gameObject, "body_leftarm", characterSettings.leftArmSpriteIndex, newColor, characterSettings);
        ////Head
        //PlayerCustomisationMessage.SendToAll(gameObject, "body_head", characterSettings.headSpriteIndex, newColor, characterSettings);


        //PlayerCustomisationMessage.SendToAll(gameObject, "body_right_hand", characterSettings.headSpriteIndex, newColor, characterSettings);
        //PlayerCustomisationMessage.SendToAll(gameObject, "body_left_hand", characterSettings.headSpriteIndex, newColor, characterSettings);

        //Eyes
        //ColorUtility.TryParseHtmlString(characterSettings.eyeColor, out newColor);
        //PlayerCustomisationMessage.SendToAll(gameObject, "eyes", 1, newColor);
        ////Underwear
        //PlayerCustomisationMessage.SendToAll(gameObject, "underwear", characterSettings.underwearOffset, Color.white);
        ////Socks
        //PlayerCustomisationMessage.SendToAll(gameObject, "socks", characterSettings.socksOffset, Color.white);
        ////Beard
        //ColorUtility.TryParseHtmlString(characterSettings.facialHairColor, out newColor);
        //PlayerCustomisationMessage.SendToAll(gameObject, "beard", characterSettings.facialHairOffset, newColor);
        ////Hair
        //ColorUtility.TryParseHtmlString(characterSettings.hairColor, out newColor);
        //PlayerCustomisationMessage.SendToAll(gameObject, "Hair", characterSettings.hairStyleOffset, newColor);
    }