65 lines
1.7 KiB
C#
65 lines
1.7 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace AibisDream.Kit
|
|
{
|
|
public class ActionKit
|
|
{
|
|
public static ulong IDGenerator = 0;
|
|
|
|
public static IAction Delay(float seconds, Action callback)
|
|
{
|
|
return Kit.Delay.Allocate(seconds, callback);
|
|
}
|
|
|
|
public static ISequence Sequence()
|
|
{
|
|
return Kit.Sequence.Allocate();
|
|
}
|
|
|
|
public static IAction DelayFrame(int frameCount, Action onDelayFinish)
|
|
{
|
|
return Kit.DelayFrame.Allocate(frameCount, onDelayFinish);
|
|
}
|
|
|
|
public static IAction NextFrame(Action onNextFrame)
|
|
{
|
|
return Kit.DelayFrame.Allocate(1, onNextFrame);
|
|
}
|
|
|
|
public static IAction Lerp(float a,float b,float duration,Action<float> onLerp,Action onLerpFinish = null)
|
|
{
|
|
return Kit.Lerp.Allocate(a, b, duration, onLerp, onLerpFinish);
|
|
}
|
|
|
|
public static IAction Callback(Action callback)
|
|
{
|
|
return Kit.Callback.Allocate(callback);
|
|
}
|
|
|
|
public static IRepeat Repeat(int repeatCount = -1)
|
|
{
|
|
return Kit.Repeat.Allocate(repeatCount);
|
|
}
|
|
|
|
public static IParallel Parallel()
|
|
{
|
|
return Kit.Parallel.Allocate();
|
|
}
|
|
|
|
public void ComplexAPI()
|
|
{
|
|
}
|
|
|
|
public static IAction Coroutine(Func<IEnumerator> coroutineGetter)
|
|
{
|
|
return CoroutineAction.Allocate(coroutineGetter);
|
|
}
|
|
|
|
public static IAction Task(Func<Task> taskGetter)
|
|
{
|
|
return TaskAction.Allocate(taskGetter);
|
|
}
|
|
}
|
|
} |