|
|
|
|
|
|
|
|
|
|
public override void OnStateEnter() |
|
|
|
{ |
|
|
|
if(_whenToRun == SpecificMoment.OnStateEnter) |
|
|
|
if (_whenToRun == SpecificMoment.OnStateEnter) |
|
|
|
SetParameter(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
switch (_parameterType) |
|
|
|
{ |
|
|
|
case AnimatorParameterActionSO.ParameterType.Bool: _animator.SetBool(_parameterHash, _boolValue); break; |
|
|
|
case AnimatorParameterActionSO.ParameterType.Int: _animator.SetInteger(_parameterHash, _intValue); break; |
|
|
|
case AnimatorParameterActionSO.ParameterType.Float: _animator.SetFloat(_parameterHash, _floatValue); break; |
|
|
|
case AnimatorParameterActionSO.ParameterType.Trigger: _animator.SetTrigger(_parameterHash); break; |
|
|
|
case AnimatorParameterActionSO.ParameterType.Bool: |
|
|
|
_animator.SetBool(_parameterHash, _boolValue); |
|
|
|
break; |
|
|
|
case AnimatorParameterActionSO.ParameterType.Int: |
|
|
|
_animator.SetInteger(_parameterHash, _intValue); |
|
|
|
break; |
|
|
|
case AnimatorParameterActionSO.ParameterType.Float: |
|
|
|
_animator.SetFloat(_parameterHash, _floatValue); |
|
|
|
break; |
|
|
|
case AnimatorParameterActionSO.ParameterType.Trigger: |
|
|
|
_animator.SetTrigger(_parameterHash); |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|