Skip to content

MovementAnimations

class MovementAnimations(private val slots: Array<Int?>) : Component()
constructor(
stand: Int? = null,
turn: Int? = null,
walk: Int? = null,
walkBack: Int? = null,
walkLeft: Int? = null,
walkRight: Int? = null,
run: Int? = null
)
Example
fun limp(player: Actor, limpWalk: AnimationDefinition) {
player.replaceComponent(MovementAnimations(walk = limpWalk.id, run = limpWalk.id))
player.message("Your leg hurts.")
}
var kept: Set<Int>
override fun onComponentAddedToEntity()
var held: ((itemId: Int) -> MovementAnimations?)?