Ejemplo n.º 1
0
    public void ChoiceFacialHair()
    {
        string path = "";

        path = animUtils.backFacialName((int)facialHairSlider.value);

        animUtils.loadAnimationClip(path, thePlayer.isMan, "facial", "Animation/Character/");
        animUtils.customizeAnimationSet(animUtils.arrayOneObjectAnimationHandler, (int)facialHairSlider.value, "facial", thePlayerAnimator);

        animUtils.facialEnum = (AnimationCreaterUtils.enumFacial)facialHairSlider.value;
        facialText.text      = animUtils.facialEnum.ToString();

        colorPickerWheel.GetComponent <ColorWheelControl>().Selection = Color.white;
        colorPickerWheel.GetComponent <ColorWheelControl>().PickColor(Color.white);
        colorChoiceEnum = enumColorChoice.FACIAL;
    }
Ejemplo n.º 2
0
    public void ChoiceEras()
    {
        string path = "";

        path = animUtils.backEarsName((int)earsSlider.value);

        animUtils.loadAnimationClip(path, thePlayer.isMan, "ears", "Animation/Character/");
        animUtils.customizeAnimationSet(animUtils.arrayOneObjectAnimationHandler, (int)earsSlider.value, "ears", thePlayerAnimator);

        animUtils.earsEnum = (AnimationCreaterUtils.enumEars)earsSlider.value;
        earsText.text      = animUtils.earsEnum.ToString();

        colorPickerWheel.GetComponent <ColorWheelControl>().Selection = Color.white;
        colorPickerWheel.GetComponent <ColorWheelControl>().PickColor(Color.white);
        colorChoiceEnum = enumColorChoice.EARS;
    }
Ejemplo n.º 3
0
    public void ChoiceNose()
    {
        string path = "";

        path = animUtils.backNoseName((int)noseSlider.value);

        animUtils.loadAnimationClip(path, thePlayer.isMan, "nose", "Animation/Character/");
        animUtils.customizeAnimationSet(animUtils.arrayOneObjectAnimationHandler, (int)noseSlider.value, "nose", thePlayerAnimator);

        animUtils.noseEnum = (AnimationCreaterUtils.enumNose)noseSlider.value;
        noseText.text      = animUtils.noseEnum.ToString();

        colorPickerWheel.GetComponent <ColorWheelControl>().Selection = Color.white;
        colorPickerWheel.GetComponent <ColorWheelControl>().PickColor(Color.white);
        colorChoiceEnum = enumColorChoice.NOSE;
    }
Ejemplo n.º 4
0
    public void ChoiceRace()
    {
        string path = "";

        path = animUtils.backBodyName((int)raceSlider.value);

        switch (path)
        {
        case "black":
            mainGameScen = "Ubalib";
            break;

        case "dark":                         //slave
            mainGameScen = "Police";
            break;

        case "darkelf":                         //ethernal
            mainGameScen = "Telkawia";
            break;

        case "light":
            mainGameScen = "Trotlin";
            break;

        case "tanned":
            mainGameScen = "Grunled";
            break;

        case "skeleton":
            mainGameScen = "Police";
            break;

        case "orc":
            mainGameScen = "Mosicowa";
            break;

        case "redorc":
            mainGameScen = "Mosicowa";
            break;

        case "default":
            mainGameScen = "Start";
            break;

        default:
            mainGameScen = "Start";
            break;
        }

        if (path == "darkelf")
        {
            isGhost = true;
        }
        else
        {
            isGhost = false;
        }

        if (!thePlayer.isMan)
        {
            if (path == "skeleton")
            {
                path             = "orc";
                raceSlider.value = (int)AnimationCreaterUtils.enumRace.ORC;
            }
        }
        thePlayer.startPoint = path;
        if (path != "")
        {
            animUtils.loadAnimationClip(path, thePlayer.isMan, "body", "Animation/Character/");

            animUtils.raceEnum = (AnimationCreaterUtils.enumRace)raceSlider.value;
            raceText.text      = animUtils.nameToRace((int)raceSlider.value);

            //raceText.text = animUtils.raceEnum.ToString();

            animUtils.customizeAnimationSet(animUtils.arrayOneObjectAnimationHandler, (int)raceSlider.value, "body", thePlayerAnimator);


            if ((animUtils.raceEnum == AnimationCreaterUtils.enumRace.ORC) || (animUtils.raceEnum == AnimationCreaterUtils.enumRace.REDORC))
            {
                earsSlider.value = earsSlider.maxValue;
                earsSlider.gameObject.SetActive(false);
                //	ChoiceEras();

                eyesSlider.value = eyesSlider.maxValue;
                eyesSlider.gameObject.SetActive(false);
                //	ChoiceEyes();
            }
            else
            {
                earsSlider.gameObject.SetActive(true);
                eyesSlider.gameObject.SetActive(true);
            }
            colorPickerWheel.GetComponent <ColorWheelControl>().Selection = Color.white;
            colorPickerWheel.GetComponent <ColorWheelControl>().PickColor(Color.white);

            if (isGhost)
            {
                body.color   = new Color(body.color.r, body.color.g, body.color.b, 0.4f);
                hair.color   = new Color(hair.color.r, hair.color.g, hair.color.b, 0.4f);
                ears.color   = new Color(ears.color.r, ears.color.g, ears.color.b, 0.4f);
                eyes.color   = new Color(eyes.color.r, eyes.color.g, eyes.color.b, 0.4f);
                nose.color   = new Color(nose.color.r, nose.color.g, nose.color.b, 0.4f);
                facial.color = new Color(facial.color.r, facial.color.g, facial.color.b, 0.4f);
            }
            else
            {
                body.color   = new Color(body.color.r, body.color.g, body.color.b, 1f);
                hair.color   = new Color(hair.color.r, hair.color.g, hair.color.b, 1f);
                ears.color   = new Color(ears.color.r, ears.color.g, ears.color.b, 1f);
                eyes.color   = new Color(eyes.color.r, eyes.color.g, eyes.color.b, 1f);
                nose.color   = new Color(nose.color.r, nose.color.g, nose.color.b, 1f);
                facial.color = new Color(facial.color.r, facial.color.g, facial.color.b, 1f);
            }

            colorChoiceEnum = enumColorChoice.RACE;
        }
    }