Skip to content

VisibilityPredicate

fun interface VisibilityPredicate
Example
val ghostSight = VisibilityPredicate { observer, _ -> observer.inGroup("ghost_seers") }
on_world_start {
World.spawn(Assets.Npc.goblin, Tile4.global(3240, 3220)).addComponent(VisibleWhen(ghostSight))
}
fun accept(
observer: Actor,
subject: Entity
): Boolean