Skip to content

on_self_spawn

fun <reified K : Entity> on_self_spawn(behaviour: (self: K) -> Unit)
(self: K) -> Unit

Works with: Entity

Example
node<Npc>()
on_self_spawn { npc ->
npc.speak("I guard this cave.")
}