Add dice roller
This commit is contained in:
1 parent
5fd21eefeb
commit
19fc024b4c
3 files changed
+53
-7
No files matched your search
@@ -0,0 +1,10 @@
|
||||
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)
|
||||
Reference in new issue
Block a user