mirror of
https://github.com/Steffo99/hella-farm.git
synced 2024-11-21 23:54:23 +00:00
Create Random
class with static rng utils
This commit is contained in:
parent
edbbd130dc
commit
165abc794a
1 changed files with 12 additions and 0 deletions
12
random.gd
Normal file
12
random.gd
Normal file
|
@ -0,0 +1,12 @@
|
|||
class_name Random
|
||||
|
||||
## Random number generator utilities
|
||||
|
||||
## Lazy init [RandomNumberGenerator].
|
||||
static var rng: RandomNumberGenerator = null:
|
||||
get:
|
||||
if rng == null:
|
||||
rng = RandomNumberGenerator.new()
|
||||
return rng
|
||||
set(value):
|
||||
rng = value
|
Loading…
Reference in a new issue