using System.Collections; using System.Collections.Generic; using UnityEngine; namespace Beyond { public class ColumnController : MonoBehaviour { [SerializeField] private List m_animators = new List(); private Coroutine m_coroutine; public void RotateColumn() { if (m_coroutine == null) { m_coroutine = StartCoroutine(COR_Rotate()); } } private IEnumerator COR_Rotate() { foreach (var animator in m_animators) { animator.SetTrigger("Rotate"); yield return new WaitForSeconds(0.5f); } m_coroutine = null; } } }