36 lines
694 B
GDScript
36 lines
694 B
GDScript
extends Reference
|
|
|
|
const NAME = "blocked"
|
|
|
|
var ctx = null
|
|
|
|
func _init():
|
|
pass
|
|
|
|
func enter_from(state):
|
|
ctx.get_node("coin_machine").enabled = false
|
|
ctx.get_node("item_holder").add_enabled = true
|
|
ctx.get_node("item_holder").remove_enabled = true
|
|
ctx.status_light.warn()
|
|
ctx.item_dump.enabled = false
|
|
|
|
func exit_to(state):
|
|
pass
|
|
|
|
func on_coin_machine_coin_requirement_met(player):
|
|
assert(false)
|
|
|
|
func on_grow_timer_timeout():
|
|
assert(false)
|
|
|
|
func on_item_holder_item_changed(item):
|
|
if item == null:
|
|
ctx.change_state(ctx.StateIdle.new())
|
|
|
|
func on_item_dump_item_dump_completed():
|
|
assert(false)
|
|
|
|
func on_damage_taken():
|
|
if ctx.current_hp <= 0:
|
|
ctx.change_state(ctx.StateBroken.new())
|