VisibleWhen
class VisibleWhen(internal val predicate: VisibilityPredicate) : Component()on_world_start { val ghost = World.spawn(Assets.Npc.goblin, Tile4.global(3240, 3220)) ghost.addComponent(VisibleWhen { observer, _ -> observer.isIn(Scenes.boss_arena) })}onComponentAddedToEntity
Section titled “onComponentAddedToEntity”override fun onComponentAddedToEntity()onComponentRemovedFromEntity
Section titled “onComponentRemovedFromEntity”override fun onComponentRemovedFromEntity()