当前位置:   article > 正文

Timer延迟循环计时器_计时器 回调

计时器 回调

我的资源库中搜索资源名:TimerService

使用方法如下:

其中MyTimer 与 TimerService类为工具类,将SuperInvokeTag 进行封装使用


        MyTimerService.Inst.CreateTimer(2f,()=> {
            Debug.LogError("延迟两秒");
        });

        //MyTimer my = MyTimerService.Inst.CreateRepeatTimer(2f,()=> {
        //    Debug.LogError("循环");
        //});
        //my.Stop();

        JacobGames.SuperInvoke.SuperInvokeTag tag = MyTimerService.Inst.CreateDelayTimerWithHandler(2f,()=> {
            Debug.LogError("返回句柄");
        });


        JacobGames.SuperInvoke.SuperInvoke.Kill(tag);
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/菜鸟追梦旅行/article/detail/240713
推荐阅读
  

闽ICP备14008679号