Constructor


PushBlock(x: any, y: any, shape: any, properties: any, sprite: any, solved_sprite: any)

Arguments:

x: any
y: any
shape: any
properties: any
sprite: any
solved_sprite: any




Methods


PushBlock:checkCollision(facing: any)

Arguments:

facing: any

Returns:

1: boolean


PushBlock:onInteract(chara: any, facing: any)

Arguments:

chara: any
facing: any

Returns:

1: boolean


PushBlock:onPush(facing: any)

Arguments:

facing: any


PushBlock:onPushEnd(facing: any)

(Override) Called when a block finishes being pushed

Arguments:

facing: any


PushBlock:onPushFail(facing: any)

(Override) Called when a block cannot be pushed because of collision

Arguments:

facing: any


PushBlock:onReset()

(Override) Called when the block is reset



PushBlock:onSolved()

(Override) Called when the block enters a solved state



PushBlock:onUnsolved()

(Override) Called when the block stops being in a solved state





PushBlock:reset()

Fades the block out and returns it to its original position




Fields


PushBlock.default_sprite: string

[Property sprite] An optional custom sprite the block should use


PushBlock.input_lock: boolean

[Property inputlock] Whether the player's input's are locked while the block is being pushed


PushBlock.lock_in_place: boolean

[Property lock] Whether the block gets locked in place when in a solved state (Defaults to false)


PushBlock.press_buttons: boolean

[Property pressbuttons] Unused (Defaults to true)


PushBlock.push_dist: number

[Property pushdist] The number of pixels the block moves per push (Defaults to 40, one tile)


PushBlock.push_sound: string

[Property pushsound] The name of the sound file to play when the block is pushed (Defaults to pushsound)


PushBlock.push_timer: number

[Property pushtime] The time the block takes to complete a push, in seconds (Defaults to 0.2)



PushBlock.solved: boolean

Whether the pushblock is in a solved state


PushBlock.solved_sprite: string

[Property solvedsprite] An optional custom solve sprite the block uses


PushBlock.start_x: number

Initial position of the block


PushBlock.start_y: number

Initial position of the block


PushBlock.state: string

The current state of the Pushblock - value can be IDLE, PUSH, or RESET



Undocumented