Anri/AdBlockNot
Archived
1
0
Fork 0

Merge branch 'main' of github.com:Mylloon/GJ803z2024

This commit is contained in:
Mylloon 2024-01-28 19:20:17 +01:00
commit a062c5a7cb
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
4 changed files with 36 additions and 3 deletions

View file

@ -0,0 +1,11 @@
[gd_scene load_steps=3 format=3 uid="uid://wo0ujdthnlrb"]
[ext_resource type="PackedScene" uid="uid://n06gkookqeml" path="res://scenes/game/windows/Ads.tscn" id="1_6ucwo"]
[ext_resource type="Script" path="res://scripts/ads/Ads_normal.gd" id="2_usogt"]
[node name="Windows" instance=ExtResource("1_6ucwo")]
script = ExtResource("2_usogt")
[node name="Sprite2D" type="Sprite2D" parent="." index="2"]
position = Vector2(10, 53)
scale = Vector2(0.4, 0.34)

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=8 format=3 uid="uid://dgsu5jn00smc8"] [gd_scene load_steps=8 format=3 uid="uid://cyxifateppwnk"]
[ext_resource type="PackedScene" uid="uid://n06gkookqeml" path="res://scenes/game/windows/Ads.tscn" id="1_g6iem"] [ext_resource type="PackedScene" uid="uid://n06gkookqeml" path="res://scenes/game/windows/Ads.tscn" id="1_g6iem"]
[ext_resource type="Script" path="res://scripts/ads/Ads_sexy_robot.gd" id="2_17d4p"] [ext_resource type="Script" path="res://scripts/ads/Ads_sexy_robot.gd" id="2_17d4p"]
@ -14,7 +14,7 @@ thickness = 20
color = Color(0.823529, 0, 0, 1) color = Color(0.823529, 0, 0, 1)
thickness = 20 thickness = 20
[node name="Windows" instance=ExtResource("1_g6iem")] [node name="Windows2" instance=ExtResource("1_g6iem")]
script = ExtResource("2_17d4p") script = ExtResource("2_17d4p")
[node name="Panel" parent="." index="0"] [node name="Panel" parent="." index="0"]

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

@ -6,11 +6,12 @@ func _ready():
$Panel2/Button.disabled = true $Panel2/Button.disabled = true
pass pass
func exit_condition(): func exit_condition():
return condition return condition
# Called every frame. 'delta' is the elapsed time since the previous frame. # Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta): func _process(delta):
close() close()
func _on_button_pressed(): func _on_button_pressed():