public void ResetTimer() { if (forver) { return; } deleteTimer.Start(); }
public void Run() { _frameStartTime = DateTime.Now.TimeOfDay; _frameTimer.Start(); _break = false; _continueSignal.Set(); }
int refrence = 0; // refrence num public CacheItem(CallBack delete, bool _forver = false) { Delete = delete; forver = _forver; if (!forver) { deleteTimer = new NativeTimer(Delete, survival, false); deleteTimer.Start(); } }
public void UnLoad() { if (unloaded) { return; } if (timer != null) { return; } timer = new NativeTimer(OnUnload, 0.1f, false); timer.Start(); }
int refrence = 0; // refrence num public CacheItem(CallBack delete, bool _forver, float _survival) { Delete = delete; forver = _forver; if (_survival > 0) { survival = _survival; } if (!forver) { deleteTimer = new NativeTimer(Delete, survival, false); deleteTimer.Start(); } }
public LoaderContianer(int synchronize = 1) { if (synchronize < 1) { synchronize = 1; } taskList = new List <LoaderTask>(); loaderitemList = new List <LoaderItem>(); for (int i = 0; i < synchronize; i++) { LoaderItem item = new LoaderItem(); item.AddListenerIdle(LoadFinish); loaderitemList.Add(item); } timer = new NativeTimer(Update, 0.3f); timer.Start(); }
public void LoadAsync(CallBack cback = null) { callback = cback; if (string.IsNullOrEmpty(_sceneName)) { return; } if (isCurrent()) { Debug.LogError("加载场景为当前场景!!"); return; } Resources.UnloadUnusedAssets(); System.GC.Collect(); operation = SceneManager.LoadSceneAsync(_sceneName, LoadSceneMode.Single); timer = new NativeTimer(UpdateLoadingUI, 0.01f, true); timer.Start(); }
void resetSec() { NativeTimer timer = new NativeTimer(survtime, 0.01f, true, 300); timer.Start(); }