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

22 lines
464 B
GDScript3
Raw Normal View History

2024-01-28 18:13:30 +01:00
extends "res://scripts/ads/ads_default.gd"
2024-01-28 18:27:12 +01:00
@onready var button := $ButtonDice/Button
@onready var label_left := $Dice/Left
@onready var label_right := $Dice/Right
2024-01-28 18:13:30 +01:00
func _ready():
2024-01-28 18:27:12 +01:00
label_left.text = "0"
label_right.text = "0"
2024-01-28 18:13:30 +01:00
func exit_condition():
return condition
2024-01-28 18:27:12 +01:00
func _on_button_pressed():
var left := randi_range(0, 6)
var right := randi_range(0, 6)
label_left.text = str(left)
label_right.text = str(right)
condition = left + right >= 5