Skip to content

异步任务

Hiram edited this page Apr 2, 2018 · 1 revision
  • 异步任务
    • 获取网络Ping值
          new AsyncRepeatingPingTask(x =>
          {
              string log = "current ping is: " + x;
          }, "ip", 1);
    • 定时重复执行
          new AsyncRepeatingTask(() =>
          {
              string log = "execute";
          }, 1);
    • 异步加载
          new AsyncResourceLoadTask((x)=>
          {
             var go= UnityEngine.Object.Instantiate(x) as GameObject;
          },"path");
    • 定时执行
          new AsyncTimeTask(()=>
          {
              string log = "execute";
          },1);
    • 检测变量值变化
          bool test = false;
          void Main()
          {
            new AsyncWaitTrueTask(() => { UnityEngine.Debug.LogError("true"); }, ref test);
          }
    • WWW下载
          new AsyncWWWTask((x) =>
          {
              string log = x.bytes.ToString();
          }, "url");

Component

Extensions

Core

  • 框架基础逻辑
  • 组件维护
  • Tick管理
  • 断言
  • Ticker组件
Clone this wiki locally