Files
BITFALL/Assets/BITKit/Unity/Scripts/Components/LoopEvent.cs
CortexCore 45913c6b3e 1
2023-08-23 01:59:40 +08:00

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;
}
}
}