Microgame win signal!
This commit is contained in:
parent
56377b3afa
commit
0a6c750565
3 changed files with 10 additions and 0 deletions
|
@ -29,4 +29,8 @@ func _on_microgame_spawn_timer_timeout() -> void:
|
|||
window_instance.position = Vector2(window_x, window_y)
|
||||
|
||||
# Connect signals
|
||||
window_instance.win.connect(_on_microgame_win)
|
||||
|
||||
|
||||
func _on_microgame_win(window: MicrogameWindow):
|
||||
print("yay")
|
||||
|
|
|
@ -17,3 +17,4 @@ func _process(delta: float) -> void:
|
|||
func _on_close_requested() -> void:
|
||||
super()
|
||||
print("Hmm perchance")
|
||||
win.emit(self)
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
extends Window
|
||||
class_name MicrogameWindow
|
||||
|
||||
|
||||
signal win(this: MicrogameWindow)
|
||||
|
||||
|
||||
func _on_close_requested() -> void:
|
||||
queue_free()
|
||||
|
|
Loading…
Add table
Reference in a new issue