1
This commit is contained in:
17
Packages/Runtime/Components/LoopEvent.cs
Normal file
17
Packages/Runtime/Components/LoopEvent.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user