1
Fork 0
mirror of https://github.com/Steffo99/hella-farm.git synced 2024-11-22 16:14:22 +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)