Esempio n. 1
0
 public void ResetTimer()
 {
     if (forver)
     {
         return;
     }
     deleteTimer.Start();
 }
Esempio n. 2
0
 public void Run()
 {
     _frameStartTime = DateTime.Now.TimeOfDay;
     _frameTimer.Start();
     _break = false;
     _continueSignal.Set();
 }
Esempio n. 3
0
    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();
        }
    }
Esempio n. 4
0
    public void UnLoad()
    {
        if (unloaded)
        {
            return;
        }
        if (timer != null)
        {
            return;
        }

        timer = new NativeTimer(OnUnload, 0.1f, false);
        timer.Start();
    }
Esempio n. 5
0
    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();
        }
    }
Esempio n. 6
0
    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();
    }
Esempio n. 7
0
    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();
    }
Esempio n. 8
0
    void resetSec()
    {
        NativeTimer timer = new NativeTimer(survtime, 0.01f, true, 300);

        timer.Start();
    }