32 lines
742 B
C#
32 lines
742 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace Beyond
|
|
{
|
|
public class ColumnController : MonoBehaviour
|
|
{
|
|
[SerializeField] private List<Animator> m_animators = new List<Animator>();
|
|
|
|
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;
|
|
}
|
|
}
|
|
} |