Added onStart(task) and onDone(task) for IAction

This commit is contained in:
bigguy345 committed 2025-07-06 23:59:31 +03:00
1 parent 8d63134a72
commit 835b32daa1
3 files changed
+40 -1

No files matched your search

@@ -267,6 +267,8 @@ public class ActionQueue implements IActionQueue {
Action cab = (Action) current;
cab.tick();
if (cab.isDone()) {
if (cab.onDone != null)
cab.execute("task", cab::executeOnDone);
cab.kill();
queue.pollFirst();
}
@@ -277,6 +279,8 @@ public class ActionQueue implements IActionQueue {
Action a = (Action) pit.next();
a.tick();
if (a.isDone()) {
if (a.onDone != null)
a.execute("complete", a::executeOnDone);
a.kill();
pit.remove();
}