Esempio n. 1
0
        void SendEvents(SliderUiEventStateAnimatorParameterSetterData uiEvent)
        {
            switch (uiEvent.Type)
            {
            case AnimatorControllerParameterType.Bool:
                var boolValue = _setter.GetBool(uiEvent.Name);
                _setter.SetBool(uiEvent.Name, !boolValue);
                break;

            case AnimatorControllerParameterType.Float:
                _setter.SetFloat(uiEvent.Name, uiEvent.FloatVlaue);
                break;

            case AnimatorControllerParameterType.Int:
                _setter.SetInt(uiEvent.Name, uiEvent.IntVlaue);
                break;

            case AnimatorControllerParameterType.Trigger:
                _setter.SetTrigger(uiEvent.Name);
                break;

            default:
                break;
            }
        }
Esempio n. 2
0
        void SetParameter()
        {
            switch (_parameterType)
            {
            case AnimatorControllerParameterType.Bool:
                _setter.SetBool(_parameterName, _boolValue);
                break;

            case AnimatorControllerParameterType.Float:
                _setter.SetFloat(_parameterName, _floatValue);
                break;

            case AnimatorControllerParameterType.Int:
                _setter.SetInt(_parameterName, _intValue);
                break;

            case AnimatorControllerParameterType.Trigger:
                _setter.SetTrigger(_parameterName);
                break;

            default:
                break;
            }
        }