1
Fork 0
mirror of https://github.com/Steffo99/swear-jar.git synced 2024-11-24 08:34:19 +00:00
swear-jar/random/roller.gd

15 lines
187 B
GDScript3
Raw Normal View History

2023-10-01 14:09:43 +00:00
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()