addGoals

fun <M : Mob> M.addGoals(priority: Int, goal: Goal<M>)

Adds a single goal to this mob with the specified priority.

Parameters

priority

the priority of the goal (lower values execute first)

goal

the goal to add


fun <M : Mob> M.addGoals(priority: Int, vararg goals: Goal<M>)

Adds multiple goals to this mob with the same priority.

Parameters

priority

the priority of the goals (lower values execute first)

goals

the goals to add