2025-09-05 19:46:30 +08:00
|
|
|
using System;
|
|
|
|
|
|
2025-12-24 14:34:26 +08:00
|
|
|
namespace AlicizaX
|
2025-09-05 19:46:30 +08:00
|
|
|
{
|
|
|
|
|
[UnityEngine.Scripting.Preserve]
|
2026-03-26 16:14:05 +08:00
|
|
|
public interface ITimerService : IService, IServiceTickable
|
2025-09-05 19:46:30 +08:00
|
|
|
{
|
2025-12-24 14:34:26 +08:00
|
|
|
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();
|
2025-09-05 19:46:30 +08:00
|
|
|
}
|
|
|
|
|
}
|