summaryrefslogtreecommitdiff
path: root/scenes/microgames/ad/ad_window.gd
diff options
context:
space:
mode:
Diffstat (limited to 'scenes/microgames/ad/ad_window.gd')
-rw-r--r--scenes/microgames/ad/ad_window.gd8
1 files changed, 7 insertions, 1 deletions
diff --git a/scenes/microgames/ad/ad_window.gd b/scenes/microgames/ad/ad_window.gd
index 3e3fc33..88111a9 100644
--- a/scenes/microgames/ad/ad_window.gd
+++ b/scenes/microgames/ad/ad_window.gd
@@ -6,6 +6,7 @@ extends "res://scenes/microgames/microgame_window.gd"
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
+
# Choose a random ad
var all_ads := $"All ads"
var sprite := all_ads.get_children().pick_random() as Sprite2D
@@ -20,7 +21,6 @@ func _ready() -> void:
float(window_size.y) / float(sprite.texture.get_height())
)
-
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
@@ -34,3 +34,9 @@ func _on_close_requested() -> void:
func _on_texture_button_pressed() -> void:
OS.shell_open("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
+ lose.emit(self)
+
+
+
+func _on_timer_timeout() -> void:
+ ad_open.emit(self)