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