File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -117,11 +117,24 @@ public void AddUpdate(TimerCallback callback, object callbackParam)
117
117
Add ( 0.001f , 0 , callback , callbackParam ) ;
118
118
}
119
119
120
+ /// <summary>
121
+ /// 启动协程
122
+ /// </summary>
123
+ /// <param name="routine"></param>
120
124
public void StartCoroutine ( IEnumerator routine )
121
125
{
122
126
_engine . StartCoroutine ( routine ) ;
123
127
}
124
128
129
+ /// <summary>
130
+ /// 停止协程
131
+ /// </summary>
132
+ /// <param name="routine"></param>
133
+ public void StopCoroutine ( IEnumerator routine )
134
+ {
135
+ _engine . StopCoroutine ( routine ) ;
136
+ }
137
+
125
138
public bool Exists ( TimerCallback callback )
126
139
{
127
140
if ( _toAdd . ContainsKey ( callback ) )
@@ -160,6 +173,7 @@ private Anymous_T GetFromPool()
160
173
}
161
174
else
162
175
t = new Anymous_T ( ) ;
176
+
163
177
return t ;
164
178
}
165
179
@@ -203,6 +217,7 @@ public void Update()
203
217
_toRemove . Add ( i ) ;
204
218
}
205
219
}
220
+
206
221
repeat = i . repeat ;
207
222
if ( i . callback != null )
208
223
{
@@ -222,6 +237,7 @@ public void Update()
222
237
i . callback ( i . param ) ;
223
238
}
224
239
}
240
+
225
241
iter . Dispose ( ) ;
226
242
}
227
243
@@ -237,6 +253,7 @@ public void Update()
237
253
ReturnToPool ( i ) ;
238
254
}
239
255
}
256
+
240
257
_toRemove . Clear ( ) ;
241
258
}
242
259
@@ -277,4 +294,4 @@ void Update()
277
294
Timers . inst . Update ( ) ;
278
295
}
279
296
}
280
- }
297
+ }
You can’t perform that action at this time.
0 commit comments