Example #1
0
        void OnEnable()
        {
            input = this.GetComponent <InputFieldSlider>();
            if (_uicreator == null || input == null)
            {
                return;
            }

            switch (sliderType)
            {
            case BodySliderType.X:
                input.slider.value = _uicreator.character.GetBodySlider(segmentType).x;
                break;

            case BodySliderType.Y:
                input.slider.value = _uicreator.character.GetBodySlider(segmentType).y;
                break;

            case BodySliderType.Symmetrical:
                input.slider.value = _uicreator.character.GetBodySlider(segmentType).x;
                break;

            default:
                break;
            }
        }
Example #2
0
 void Awake()
 {
     _uicreator = this.GetComponentInParent <UICreator>();
     input      = GetComponent <InputFieldSlider>();
     input.onValueChanged.AddListener(UpdateScale);
 }