Updated the level.glb with new asset. Updated comm station to match the new asset and added broken state to it
This commit is contained in:
1 parent
1534a9a216
commit
4a715d9b6d
6 files changed
+43
-27
No files matched your search
@@ -1,6 +1,6 @@
|
||||
extends Reference
|
||||
|
||||
const NAME = "blocked"
|
||||
const NAME = "broken"
|
||||
|
||||
var ctx = null
|
||||
|
||||
@@ -11,6 +11,7 @@ func enter_from(state):
|
||||
ctx.coin_machine.enabled = false
|
||||
ctx.item_dump.enabled = true
|
||||
ctx.status_text.text = "Offline. Needs Repair"
|
||||
ctx.status_light.fail()
|
||||
|
||||
func exit_to(state):
|
||||
pass
|
||||
@@ -23,3 +24,6 @@ func on_item_dump_item_dump_completed():
|
||||
|
||||
func on_item_dump_item_dumped():
|
||||
print("item dumped")
|
||||
|
||||
func on_damage_taken():
|
||||
assert(false, "should be impossible in blocked state")
|
||||
@@ -11,11 +11,13 @@ 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():
|
||||
@@ -23,3 +25,7 @@ func on_item_dump_item_dump_completed():
|
||||
|
||||
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())
|
||||
Reference in new issue
Block a user