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

12 lines
193 B
GDScript3
Raw Normal View History

2024-04-16 03:08:25 +00:00
extends Sampler
class_name SamplerRandom
## Sample a random reference from the array.
func sample() -> Node:
2024-04-16 03:08:25 +00:00
if len(possibilities) == 0:
return null
return Random.sample(possibilities)