1
Fork 0
mirror of https://github.com/Steffo99/hella-farm.git synced 2024-11-27 18:44:23 +00:00
hella-farm/behaviours/sampler_random.gd

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)