Anri/AdBlockNot
Archived
1
0
Fork 0
This repository has been archived on 2024-01-28. You can view files and clone it, but cannot push or open issues or pull requests.
AdBlockNot/scripts/ads/ads_weather.gd
2024-01-28 16:37:50 +01:00

27 lines
711 B
GDScript

extends "res://scripts/ads/ads_default.gd"
@onready var image1 := $Fond/GridContainer/Image1
@onready var image2 := $Fond/GridContainer/Image2
@onready var image3 := $Fond/GridContainer/Image3
var good_image
func _ready():
var images = [ load("res://ressources/assets/Weather/CloudyV2.png")
, load("res://ressources/assets/Weather/RainyV2.png")
, load("res://ressources/assets/Weather/SunnyV2.png") ]
images.shuffle()
for i in range(0, images.size()):
if images[i].resource_path.contains("Sunny"):
good_image = i + 1
image1.icon = images[0]
image2.icon = images[1]
image3.icon = images[2]
func exit_condition():
return condition
func _on_pressed(num):
condition = num == good_image