mirror of
https://github.com/Steffo99/hella-farm.git
synced 2024-11-24 00:54:22 +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)
|