com.alicizax.unity.framework/Runtime/Timer/ITimerModule.cs
2025-12-25 10:50:14 +08:00

22 lines
788 B
C#

using System;
using System.Collections.Generic;
using AlicizaX;
namespace AlicizaX
{
[UnityEngine.Scripting.Preserve]
public interface ITimerModule : IModule, IModuleUpdate
{
int AddTimer(TimerHandler callback, float time, bool isLoop = false, bool isUnscaled = false, params object[] args);
int AddTimer(TimerHandlerNoArgs callback, float time, bool isLoop = false, bool isUnscaled = false);
int AddTimer<T>(Action<T> callback, T arg, float time, bool isLoop = false, bool isUnscaled = false);
void Stop(int timerId);
void Resume(int timerId);
bool IsRunning(int timerId);
float GetLeftTime(int timerId);
void Restart(int timerId);
void RemoveTimer(int timerId);
void RemoveAllTimer();
}
}