32 lines
660 B
GDScript
32 lines
660 B
GDScript
extends Reference
|
|
|
|
const NAME = "idle"
|
|
|
|
var ctx = null
|
|
|
|
func _init():
|
|
pass
|
|
|
|
func enter_from(state):
|
|
ctx.coin_machine.enabled = true
|
|
ctx.item_dump.enabled = false
|
|
ctx.status_text.text = "Online"
|
|
ctx.status_light.idle()
|
|
|
|
func exit_to(state):
|
|
pass
|
|
|
|
func on_coin_machine_coin_requirement_met(player):
|
|
ctx.status_light.activate()
|
|
ctx.emit_signal_comms_established()
|
|
|
|
func on_item_dump_item_dump_completed():
|
|
assert(false, "item dump should be disabled in idle state")
|
|
|
|
func _on_item_dump_item_dumped():
|
|
assert(false, "item dump should be disabled in idle state")
|
|
|
|
func on_damage_taken():
|
|
if ctx.current_hp <= 0:
|
|
ctx.change_state(ctx.StateBroken.new())
|