mirror of
https://github.com/Steffo99/hella-farm.git
synced 2024-11-21 23:54:23 +00:00
11 lines
193 B
GDScript
11 lines
193 B
GDScript
extends Sampler
|
|
class_name SamplerRandom
|
|
|
|
|
|
## Sample a random reference from the array.
|
|
|
|
|
|
func sample() -> Node:
|
|
if len(possibilities) == 0:
|
|
return null
|
|
return Random.sample(possibilities)
|