Moving
class Moving( internal var nextStep: StepDirection? = null, target: Tile3? = null, var targetFootprint: Footprint? = null, private val steps: Deque<Step> = ArrayDeque(), var within: Int? = null) : Component()
constructor(worldObject: WorldObject)
constructor(target: Entity)on_object_option(Assets.WorldObject.poordoor, "Call") { player -> val goblin = World.spatial.npcsWithin(target.tile4.tile, radius = 8, shard = target.shardId).firstOrNull() ?: return@on_object_option player.message("Nobody comes.") goblin.replaceComponent(Moving(target))}targetFootprint
Section titled “targetFootprint”var targetFootprint: Footprint?within
Section titled “within”var within: Int?target
Section titled “target”var target: Tile3?onComponentRemovedFromEntity
Section titled “onComponentRemovedFromEntity”override fun onComponentRemovedFromEntity()hasDestination
Section titled “hasDestination”fun hasDestination(): Booleanfun clear()addStep
Section titled “addStep”fun addStep( step: Tile3, type: StepType, detectCollision: Boolean = true)