Files
Studio/Assets/Scripts/XED/ComponentSystem/ActionComponentRunner.cs
2025-02-21 11:57:09 +09:00

25 lines
513 B
C#

using System.Collections.Generic;
using XRLib;
namespace XED.ComponentSystem
{
public class ActionComponentRunner : MonoBehaviour, ISingle
{
public List<ActionComponent> components =new();
public void Add(ActionComponent ac)
{
components.Add(ac);
}
void Update()
{
foreach (var c in components)
{
if (!c.isStarted)
c.Start();
c.Run();
}
}
}
}