28 lines
602 B
C#
Raw Normal View History

2025-07-11 15:42:48 +05:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace DemoKitStylizedAnimatedDogs
{
public class DemoController : MonoBehaviour
{
[SerializeField] private List<AnimationButton> _buttons;
[SerializeField] private List<Animator> _animators;
private void Start()
{
foreach(var button in _buttons)
{
button.Click += OnAnimationButtonClick;
}
}
private void OnAnimationButtonClick(int id)
{
foreach(var animator in _animators)
{
animator.SetInteger("AnimationID",id);
}
}
}
}