Expose ponder instruction addition
This commit is contained in:
parent
67a7726f1c
commit
019a61c444
1 changed files with 18 additions and 8 deletions
|
@ -192,6 +192,24 @@ public class SceneBuilder {
|
|||
Direction.UP);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an instruction to the scene. It is recommended to only use this method
|
||||
* if another method in this class or its subclasses does not already allow
|
||||
* adding a certain instruction.
|
||||
*/
|
||||
public void addInstruction(PonderInstruction instruction) {
|
||||
scene.schedule.add(instruction);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a simple instruction to the scene. It is recommended to only use this
|
||||
* method if another method in this class or its subclasses does not already
|
||||
* allow adding a certain instruction.
|
||||
*/
|
||||
public void addInstruction(Consumer<PonderScene> callback) {
|
||||
addInstruction(PonderInstruction.simple(callback));
|
||||
}
|
||||
|
||||
/**
|
||||
* Before running the upcoming instructions, wait for a duration to let previous
|
||||
* actions play out. <br>
|
||||
|
@ -816,12 +834,4 @@ public class SceneBuilder {
|
|||
|
||||
}
|
||||
|
||||
private void addInstruction(PonderInstruction instruction) {
|
||||
scene.schedule.add(instruction);
|
||||
}
|
||||
|
||||
private void addInstruction(Consumer<PonderScene> callback) {
|
||||
scene.schedule.add(PonderInstruction.simple(callback));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue