Added dice

This commit is contained in:
Donato Mastronardi
2026-02-28 16:42:08 +01:00
parent ecc5f08299
commit dbf1788069
4 changed files with 31 additions and 7 deletions

View File

@@ -13,10 +13,9 @@ func roll_dice():
if is_rolling:
return
is_rolling = true
sprite.play('rolling')
await get_tree().create_timer(roll_time).timeout
self.random_value = int(randi_range(0, 7))
self.random_value = randi_range(1, 6)
sprite.play(str(self.random_value))
is_rolling = false
func _process(delta):