Anri/AdBlockNot
Archived
1
0
Fork 0
This commit is contained in:
Manal 2024-01-28 19:19:04 +01:00
parent 2891773810
commit 3c96d41754
4 changed files with 36 additions and 3 deletions

21
scripts/ads/Ads_normal.gd Normal file
View file

@ -0,0 +1,21 @@
extends "res://scripts/ads/ads_default.gd"
var rng = RandomNumberGenerator.new()
# Called when the node enters the scene tree for the first time.
func _ready():
$Panel2/Button.disabled = false
var images = [ load("res://ressources/assets/NormalAds/PosterCrab2.png")
,load("res://ressources/assets/NormalAds/PosterCrab.png")
,load("res://ressources/assets/NormalAds/PosterMeow2.png")
,load("res://ressources/assets/NormalAds/PosterMeow.png")
]
var val = rng.randf_range(0, 4)
$Sprite2D.set_texture (images[val])
$Sprite2D.set_offset (Vector2($Sprite2D.texture.get_width()/2, ($Sprite2D.texture.get_height()/2)+30))
pass
func _on_button_pressed():
condition = true
print("pressed")

View file

@ -5,12 +5,13 @@ extends "res://scripts/ads.gd"
func _ready():
$Panel2/Button.disabled = true
pass
func exit_condition():
return condition
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta):
func _process(delta):
close()
func _on_button_pressed():