1
Fork 0
mirror of https://github.com/Steffo99/swear-jar.git synced 2024-11-25 17:14:20 +00:00
swear-jar/random/roller.gd
2023-10-01 16:27:03 +02:00

14 lines
187 B
GDScript

extends Node2D
@export_range(0,1) var slider : float = 0
signal success()
signal failure()
func roll():
if Randomizer.rng.randf() < slider:
success.emit()
else:
failure.emit()