22 lines
382 B
C#
22 lines
382 B
C#
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
|
||
|
public class AnimatorValue : MonoBehaviour
|
||
|
{
|
||
|
[SerializeField]
|
||
|
private string _tag;
|
||
|
|
||
|
private Animator _animator;
|
||
|
|
||
|
private void Awake()
|
||
|
{
|
||
|
_animator = GetComponent<Animator>();
|
||
|
}
|
||
|
|
||
|
public void SetValue(float value)
|
||
|
{
|
||
|
_animator.SetFloat(_tag, value);
|
||
|
}
|
||
|
}
|