mirror of
https://github.com/Steffo99/swear-jar.git
synced 2024-11-25 09:04:19 +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()
|
|
|