OrderedSchedule ​
Inherits: TaskSchedule < Resource
Inherited by: WanderSchedule
OrderedSchedule executes tasks in a defined sequence using clean signal-based communication. Tasks are run one after another: Task 1 → Task 2 → Task 3 → repeat (if looping).
Properties ​
ExecutionType | execution_type | ExecutionType.ORDERED |
Variables ​
int | current_task_index | 0 |
bool | has_completed_cycle | false |
Methods ​
void | start_schedule() |
void | on_task_completed( completed_task: BehaviorTask ) |
void | on_task_interrupted( interrupted_task: BehaviorTask, reason: String ) |
bool | has_next_task() |
float | get_schedule_progress() |
int | get_completed_cycles() |
void | reset_schedule() |
void | restart_schedule() |
bool | jump_to_task( index: int ) |
BehaviorTask | get_next_task() |
bool | advance_to_next_task() |
BehaviorTask | get_current_task() |
BehaviorTask | get_current_task_by_index() |
int | get_current_task_index() |
bool | skip_current_task() |
bool | insert_task_at_current( task: BehaviorTask ) |
bool | remove_current_task() |
Enumerations ​
enum ExecutionType ​
The execution strategy for this schedule
Property descriptions ​
ExecutionType execution_type = ExecutionType.ORDERED ​
Ordered: the tasks run one after the other.
Variable descriptions ​
int current_task_index = 0 ​
Current task index in the sequence
bool has_completed_cycle = false ​
Whether we've completed at least one full cycle
Method descriptions ​
void start_schedule() ​
Start this schedule - begin with first task
void on_task_completed( completed_task: BehaviorTask ) ​
Called when current task completes - advance to next task
void on_task_interrupted( interrupted_task: BehaviorTask, reason: String ) ​
Called when current task is interrupted
bool has_next_task() ​
Check if the schedule has more tasks
float get_schedule_progress() ​
Get progress through the current schedule cycle (0.0 to 1.0)
int get_completed_cycles() ​
Get total number of completed cycles
void reset_schedule() ​
Reset the schedule to the beginning
void restart_schedule() ​
Restart the schedule from the beginning
bool jump_to_task( index: int ) ​
Jump to a specific task index
BehaviorTask get_next_task() ​
Get the next task to execute based on ordered sequence
bool advance_to_next_task() ​
Advance to the next task in sequence (compatibility method)
BehaviorTask get_current_task() ​
Get the current task being executed (compatibility override)
BehaviorTask get_current_task_by_index() ​
Get the task at the current index
int get_current_task_index() ​
Get the current task index
bool skip_current_task() ​
Skip the current task and advance to next
bool insert_task_at_current( task: BehaviorTask ) ​
Insert a task at the current position (will be executed next)
bool remove_current_task() ​
Remove the current task and advance