11 lines
211 B
GDScript3
11 lines
211 B
GDScript3
|
extends Control
|
||
|
|
||
|
onready var rng = RandomNumberGenerator.new()
|
||
|
|
||
|
func _ready():
|
||
|
$Button.connect("pressed", self, "roll")
|
||
|
|
||
|
func roll():
|
||
|
$Dice1.frame = rng.randi_range(0, 6)
|
||
|
$Dice2.frame = rng.randi_range(0, 6)
|