Skip to content

ActiveDuring

class ActiveDuring : Component()
constructor(vararg phases: DayPhase)
constructor(
from: Int,
to: Int
)
Example
on_world_start {
val trader = World.spawn(Assets.Npc.hans, Tile4.global(3222, 3218))
trader.addComponent(ActiveDuring(from = 6 * 60, to = 18 * 60))
}
override fun onComponentAddedToEntity()
override fun onComponentRemovedFromEntity()