Updated item_generator code to emit gen started/finished signals. hooked up level to play drill animations though the anim player is missing the actual animation
This commit is contained in:
1 parent
e433f3851b
commit
5e857e478e
6 files changed
+55
-45
No files matched your search
@@ -1,4 +1,6 @@
|
||||
extends Damageable
|
||||
signal gen_started
|
||||
signal gen_finished
|
||||
|
||||
enum EState {IDLE, WORKING, BLOCKED, BROKEN, NUM_STATES}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ func enter_from(state):
|
||||
ctx.progress_text.text = "Progress: 0%"
|
||||
ctx.status_light.activate()
|
||||
ctx.gen_timer.start()
|
||||
ctx.emit_signal("gen_started")
|
||||
|
||||
func exit_to(state):
|
||||
pass
|
||||
@@ -36,6 +37,7 @@ func on_gen_timer_timeout():
|
||||
item_slot.spawn_item(ctx.gen_item)
|
||||
count += 1
|
||||
item_slot.add_enabled = true
|
||||
ctx.emit_signal("gen_finished")
|
||||
ctx.change_state(ctx.States[ctx.EState.BLOCKED].new("Finished!"))
|
||||
|
||||
func on_item_slot_item_changed(item):
|
||||
|
||||
Reference in new issue
Block a user