|
1 |
| -``` |
2 |
| - ██╗ ██╗███╗ ██╗██╗████████╗██╗ ██╗ █████╗ ███████╗███████╗███████╗████████╗ |
3 |
| - ██║ ██║████╗ ██║██║╚══██╔══╝╚██╗ ██╔╝ ██╔══██╗██╔════╝██╔════╝██╔════╝╚══██╔══╝ |
4 |
| - ██║ ██║██╔██╗ ██║██║ ██║ ╚████╔╝ ███████║███████╗███████╗█████╗ ██║ |
5 |
| - ██║ ██║██║╚██╗██║██║ ██║ ╚██╔╝ ██╔══██║╚════██║╚════██║██╔══╝ ██║ |
6 |
| - ╚██████╔╝██║ ╚████║██║ ██║ ██║ ██║ ██║███████║███████║███████╗ ██║ |
7 |
| - ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝ ╚═╝ |
8 |
| -``` |
9 |
| -<p align="center"> <a href="README_EN.md"> English </a> | 简体中文 </p> |
10 |
| -<p align="center"> |
11 |
| -<a href="https://github.com/AIO-GAME/Unity.Asset.CLI/security/policy"> <img alt="" src="https://img.shields.io/github/package-json/unity/AIO-GAME/Unity.Asset.CLI"> </a> |
12 |
| -<a href="https://github.com/AIO-GAME/Unity.Asset.CLI/blob/main/LICENSE.md"> <img alt="" src="https://img.shields.io/github/license/AIO-GAME/Unity.Asset.CLI"> </a> |
13 |
| -<a href="https://img.shields.io/github/languages/code-size/AIO-GAME/Unity.Asset.CLI"> <img alt="" src="https://img.shields.io/github/languages/code-size/AIO-GAME/Unity.Asset.CLI"> </a> |
14 |
| -<a href="https://github.com/AIO-GAME/Unity.Asset.CLI/issues"> <img alt="" src="https://img.shields.io/github/issues/AIO-GAME/Unity.Asset.CLI"> </a> |
| 1 | +<p align="center"> |
| 2 | +<img src="RES/Logo.svg" width="256" height="256" alt="https://github.com/AIO-GAME"> |
| 3 | +</p> |
| 4 | +<p align="center" style="font-size: 24px;"> |
| 5 | +<b>Unity Timer</b> |
15 | 6 | </p>
|
| 7 | +<p align="center"><a href="README_EN.md">English</a> | 简体中文</p> |
16 | 8 | <p align="center">
|
17 |
| -<a href="https://github.com/AIO-GAME/Unity.Asset.CLI/tags"> <img alt="" src="https://img.shields.io/github/package-json/version/AIO-GAME/Unity.Asset.CLI"> </a> |
18 |
| -<a href="https://openupm.com/packages/com.aio.cli.asset/"> <img alt="" src="https://img.shields.io/npm/v/com.aio.cli.asset?label=openupm&registry_uri=https://package.openupm.com" /> </a> |
19 |
| -<a href="https://github.com/AIO-GAME/Unity.Asset.CLI"> <img alt="" src="https://img.shields.io/github/stars/AIO-GAME/Unity.Asset.CLI"> </a> |
| 9 | +<a href="https://github.com/AIO-GAME/Unity.Timer/security/policy"> |
| 10 | +<img alt="" src="https://img.shields.io/github/package-json/unity/AIO-GAME/Unity.Timer"> |
| 11 | +</a> |
| 12 | +<a href="https://github.com/AIO-Game/Unity.Timer"> |
| 13 | +<img src="https://img.shields.io/github/license/AIO-Game/Unity.Timer" alt=""/> |
| 14 | +</a> |
| 15 | +<a href="https://github.com/AIO-Game/Unity.Timer"> |
| 16 | +<img src="https://img.shields.io/github/languages/code-size/AIO-Game/Unity.Timer?label=size" alt=""/> |
| 17 | +</a> |
| 18 | +<a href="https://openupm.com/packages/com.aio.timer/"> |
| 19 | +<img src="https://img.shields.io/npm/v/com.aio.timer?label=openupm&registry_uri=https://package.openupm.com" alt=""/> |
| 20 | +</a> |
20 | 21 | </p>
|
21 | 22 |
|
22 |
| -### ⚙ 安装 |
| 23 | +## ⚙ 安装 |
23 | 24 |
|
24 | 25 | <details>
|
25 | 26 | <summary>
|
26 |
| -<span style="color: deepskyblue; "> <b> Packages Manifest </b> </span> |
| 27 | +<span style="color: deepskyblue; "><b>Packages Manifest</b></span> |
27 | 28 | </summary>
|
28 | 29 |
|
29 | 30 | ````json
|
30 | 31 | {
|
31 | 32 | "dependencies": {
|
32 |
| - "com.aio.cli.asset": "latest" |
| 33 | + "com.aio.timer": "latest" |
33 | 34 | },
|
34 | 35 | "scopedRegistries": [
|
35 | 36 | {
|
36 | 37 | "name": "package.openupm.com",
|
37 | 38 | "url": "https://package.openupm.com",
|
38 | 39 | "scopes": [
|
39 |
| - "com.aio.cli.asset", |
40 |
| - "com.aio.package" |
| 40 | + "com.aio.timer" |
41 | 41 | ]
|
42 | 42 | }
|
43 | 43 | ]
|
|
48 | 48 |
|
49 | 49 | <details>
|
50 | 50 | <summary>
|
51 |
| -<span style="color: deepskyblue; "> <b> Unity PackageManager </b> </span> |
| 51 | +<span style="color: deepskyblue; "><b>Unity PackageManager</b></span> |
52 | 52 | </summary>
|
53 | 53 |
|
54 |
| -> openupm *中国版* |
55 |
| ->> `Name: package.openupm.cn` |
56 |
| -> > `URL: https://package.openupm.cn` |
57 |
| -> > `Scope(s): com.aio.cli.asset` |
58 |
| -> |
59 |
| -> openupm *国际版* |
60 |
| ->> `Name: package.openupm.com` |
61 |
| -> > `URL: https://package.openupm.com` |
62 |
| -> > `Scope(s): com.aio.cli.asset` |
| 54 | +> open upm *中国版* |
| 55 | +
|
| 56 | +~~~ |
| 57 | +Name: package.openupm.cn |
| 58 | +URL: https://package.openupm.cn |
| 59 | +Scope(s): com.aio.timer |
| 60 | +~~~ |
| 61 | + |
| 62 | +> open upm *国际版* |
| 63 | +
|
| 64 | +~~~ |
| 65 | +Name: package.openupm.com |
| 66 | +URL: https://package.openupm.com |
| 67 | +Scope(s): com.aio.timer |
| 68 | +~~~ |
63 | 69 |
|
64 | 70 | </details>
|
65 | 71 |
|
66 | 72 | <details>
|
67 | 73 | <summary>
|
68 |
| -<span style="color: deepskyblue; "> <b> Command Line </b> </span> |
| 74 | +<span style="color: deepskyblue; "><b>Command Line</b></span> |
69 | 75 | </summary>
|
70 | 76 |
|
71 |
| -> *openupm-cli* |
72 |
| ->> `openupm add com.aio.cli.asset` |
| 77 | +> open *upm-cli* |
| 78 | +
|
| 79 | +~~~ |
| 80 | +openupm add com.aio.timer |
| 81 | +~~~ |
73 | 82 |
|
74 | 83 | </details>
|
75 | 84 |
|
76 |
| -### ⭐ 关于 |
| 85 | +## ⭐ 关于 |
77 | 86 |
|
78 |
| -- **这是 Unity 的资源加载接口(CLI)包。它提供了一组命令和工具来增强效率和开发体验。** |
| 87 | +- **这是一个 高效时间轮 定时器工具类** |
| 88 | +- ✅ **支持 Unity 2019.4 LTS 或更高版本** |
| 89 | +- ✅ **支持 .NET 4.x 和 .NET Standard 2.0** |
| 90 | +- ✅ **支持 自定义定时次数** |
| 91 | +- ✅ **支持 子线程后台运行或主线程协程运行** |
| 92 | +- ✅ **支持 自定义时间精度单位** |
| 93 | +- ✅ **支持 自定义时间轮大小** |
| 94 | +- ✅ **支持 时间轮动态扩容** |
| 95 | +- ✅ **支持 同时添加1000000+ 定时任务** |
79 | 96 |
|
80 |
| -> [!IMPORTANT] |
81 |
| -> - ✅ **支持 Unity 2019.4 及以上版本** |
82 |
| -> - ✅ **支持 资源 同步加载/异步加载/协程加载 接口** |
83 |
| -> - ✅ **支持 资源 本地模式/远程模式/编译器模式 接口** |
84 |
| -> - ✅ **支持 空包 首包 整包 自定义分包** |
85 |
| -> - ✅ **支持 Android/iOS/Windows/Mac/WebGL** |
86 |
| -> - ✅ **支持 CI/CD 流水线资源打包** |
87 |
| -> - ✅ **支持 .NET 4.x** |
88 |
| -> - ✅ **支持 il2cpp** |
89 |
| -> - ✅ **支持 Unity 增量构建** |
90 |
| -> - ✅ **支持 [UniTask](https://github.com/Cysharp/UniTask)** |
91 |
| -> - ✅ **支持 [YooAsset](https://github.com/tuyoogame/YooAsset)** |
92 |
| -> - ❌ **支持 [XAsset](https://github.com/xasset/xasset)** |
93 |
| -> - ❌ **支持 [Addressable](https://github.com/Unity-Technologies/Addressables-Sample)** |
94 |
| -> - ❌ **支持 自定义代理第三方插件** |
| 97 | +## 📚 使用 |
95 | 98 |
|
96 |
| -### 📖 文档 |
| 99 | +<h4>添加定时任务</h4> |
97 | 100 |
|
98 |
| -- [_**文档目录**_](https://github.com/AIO-GAME/Unity.Asset.CLI/wiki) |
99 |
| -- [_**API**_](./API_USAGE/AssetSystem.md) |
100 |
| -- [_**配置讲解**_](./API_USAGE/Config.md) |
101 |
| -- [_**工具使用**_](./API_USAGE/ToolWindow.md) |
| 101 | +```csharp |
| 102 | +TimerSystem.Push(1, () => { Debug.Log("1s"); }); |
| 103 | +TimerSystem.Push(2, () => { Debug.Log("2s"); }); |
| 104 | +``` |
102 | 105 |
|
103 |
| -### 🔗 第三方参考资料和工具 |
| 106 | +<h4>添加循环定时任务</h4> |
104 | 107 |
|
105 |
| -**Please refer to the wiki for a list of references and tools used in this package.** |
| 108 | +```csharp |
| 109 | +TimerSystem.PushLoop(tid, 3, () => { Debug.Log("3s"); }); |
| 110 | +``` |
106 | 111 |
|
107 |
| -| **Doc** | **Description** | |
108 |
| -|:--------------------------------------------------------:|:-------------------------------------------------------:| |
109 |
| -| **[Common](https://github.com/AIO-GAME/Common)** | _**C# Unity 通用基础函数库,用于帮助研发团队快速构建框架。**_ | |
110 |
| -| **[UniTask](https://github.com/Cysharp/UniTask#readme)** | _**为 Unity 提供了一个有效的分配自由的 async / await 集成。**_ | |
111 |
| -| **[YooAsset](https://www.yooasset.com)** | _**YooAsset 是一套用于 Unity3D 的资源管理系统,用于帮助研发团队快速部署和交付游戏。**_ | |
| 112 | +<h4>移除循环定时任务</h4> |
112 | 113 |
|
113 |
| -### ✨ 贡献者 |
| 114 | +```csharp |
| 115 | +TimerSystem.Pop(tid); |
| 116 | +``` |
| 117 | + |
| 118 | +## ✨ 贡献者 |
114 | 119 |
|
115 | 120 | <!-- readme: collaborators,contributors -start -->
|
116 | 121 | <table>
|
|
122 | 127 | <br />
|
123 | 128 | <sub><b>xinansky</b></sub>
|
124 | 129 | </a>
|
125 |
| - </td> |
126 |
| - <td align="center"> |
127 |
| - <a href="https://github.com/Starkappa"> |
128 |
| - <img src="https://avatars.githubusercontent.com/u/155533864?v=4" width="64;" alt="Starkappa"/> |
129 |
| - <br /> |
130 |
| - <sub><b>Starkappa</b></sub> |
131 |
| - </a> |
132 | 130 | </td>
|
133 | 131 | </tr>
|
134 | 132 | <tbody>
|
135 | 133 | </table>
|
136 | 134 | <!-- readme: collaborators,contributors -end -->
|
137 | 135 |
|
138 |
| -### 📢 致谢 |
| 136 | +## 📢 致谢 |
139 | 137 |
|
140 | 138 | - **谢谢您选择我们的扩展包。**
|
141 | 139 | - **如果此软件包对您有所帮助。**
|
|
0 commit comments