hasGoal

fun <M : Mob> M.hasGoal(key: GoalKey<M>): Boolean

Checks if this mob has a goal with the specified GoalKey.

Return

true if the goal exists, false otherwise

Parameters

key

the key of the goal to check


inline fun <M : Mob> M.hasGoal(key: NamespacedKey): Boolean

Checks if this mob has a goal with the specified NamespacedKey.

Return

true if the goal exists, false otherwise

Parameters

key

the namespaced key of the goal to check