diff options
author | Zoey Kitt <zoey.kitt@outlook.com> | 2024-11-17 15:10:46 -0600 |
---|---|---|
committer | Zoey Kitt <zoey.kitt@outlook.com> | 2024-11-17 15:10:46 -0600 |
commit | a0e3df5b4c0638667e72ff5e2b6071e0d62148cf (patch) | |
tree | c31f5b3dfe46bc59ca4171ad217c619274b9c9cb /scenes/microgames/ad/ad_window.gd | |
parent | 2060290b523646636bc3d46416c7fcc30311ed94 (diff) | |
parent | cd2144e9bb8320285a1e374588621a1d2ccefb57 (diff) |
Merge branch 'main' into fully_generalized_fish
Diffstat (limited to 'scenes/microgames/ad/ad_window.gd')
-rw-r--r-- | scenes/microgames/ad/ad_window.gd | 8 |
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) |