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);
发布了62 篇原创文章 · 获赞 5 · 访问量 3903

猜你喜欢

转载自blog.csdn.net/qq_42194657/article/details/103855125