18 lines
394 B
C#
18 lines
394 B
C#
|
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;
|
||
|
}
|
||
|
}
|
||
|
}
|