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