14 lines
382 B
C#
14 lines
382 B
C#
using System;
|
|
|
|
namespace ET
|
|
{
|
|
public static class FixedTimeSaveComponentSystem
|
|
{
|
|
public static void Init(this FixedTimeSaveComponent self,long time,Action action)
|
|
{
|
|
if (time != 0)
|
|
TimerComponent.Instance.Remove(ref self.timerId);
|
|
self.timerId = TimerComponent.Instance.NewRepeatedTimer(time, action);
|
|
}
|
|
}
|
|
} |