(Runnable p0, int ticks)
| 290 | |
| 291 | public void delayTicks(Runnable p0, int ticks) { |
| 292 | |
| 293 | serviceVector.add(() -> { |
| 294 | mainLoop.attach(new Scene.Perform() { |
| 295 | int t = 0; |
| 296 | |
| 297 | @Override |
| 298 | public boolean perform(int pass) { |
| 299 | if (t++ > ticks) { |
| 300 | p0.run(); |
| 301 | return false; |
| 302 | } |
| 303 | return true; |
| 304 | } |
| 305 | |
| 306 | }); |
| 307 | }); |
| 308 | } |
| 309 | |
| 310 | public void exit() { |
| 311 | try { |
| 312 | if (exitStarted.compareAndSet(false, true)) { |