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_normal.gd

19 lines
708 B
GDScript3
Raw Normal View History

2024-01-28 19:19:04 +01:00
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
2024-01-28 22:30:48 +01:00
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") ]
2024-01-28 19:19:04 +01:00
var val = rng.randf_range(0, 4)
2024-01-28 22:30:48 +01:00
$Sprite2D.set_texture(images[val])
2024-01-28 19:19:04 +01:00
2024-01-28 22:30:48 +01:00
$Sprite2D.set_offset(Vector2($Sprite2D.texture.get_width() / 2, ($Sprite2D.texture.get_height() / 2) + 30))
2024-01-28 19:19:04 +01:00
func _on_button_pressed():
condition = true
print("pressed")