addGoal

abstract fun addGoal(priority: Int, goal: Goal)

Adds the given goal to this goal selector with the given priority.

The priority system is very simple. The lower the priority, the higher the goal is on the list of goals to be executed.

For example, a goal with priority 0 will be executed before a goal with priority 1.

Parameters

priority

the priority of the goal

goal

the goal to add