rabidus-test/Assets/AnimatorValue.cs

22 lines
382 B
C#
Raw Normal View History

2023-10-13 17:31:22 +03:00
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);
}
}