using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; namespace BITKit { public class LoopEvent : MonoBehaviour { public UnityEvent[] events; int currentIndex; public void Excute() { events[currentIndex].Invoke(); currentIndex = ++currentIndex % events.Length; } } }