1
Fork 0
mirror of https://github.com/Steffo99/hella-farm.git synced 2024-11-25 09:34:24 +00:00
hella-farm/behaviours/sampler_random.gd
2024-04-16 05:08:25 +02:00

14 lines
235 B
GDScript

extends Sampler
class_name SamplerRandom
## Sample a random reference from the array.
@export var possibilities: Array = []
func sample() -> Object:
if len(possibilities) == 0:
return null
return Random.sample(possibilities)