mirror of
https://github.com/Steffo99/swear-jar.git
synced 2024-11-22 07:44:17 +00:00
14 lines
187 B
GDScript
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()
|
|
|