Skip to content

Commit

Permalink
Adding Singleton shell script
Browse files Browse the repository at this point in the history
Use it by making it an AutoLoad in your project
  • Loading branch information
DevinPentecost committed May 5, 2019
1 parent 559f7b7 commit 43d7e52
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lib/SeededRandomSequence/SeededRandomSingleton.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
extends Node

const SeededRandomSequence = preload("./SeededRandomSequence.gd")
var sequence = SeededRandomSequence.new()

"""
This is a singleton for the SeededRandomSequence
You can add it to your project as a singleton to use globally
To do this, go to Project->Project Settings->AutoLoad and add this script
You can then reference it and get/set seeds and retrieve values
For example, add it as a singleton named SeededRandomSequence and access it like:
SeededRandomSequence.sequence.reset(new_seed) #Optional
var value = SeededRandomSequence.sequence.next() #Get the random value
print(value)
"""

0 comments on commit 43d7e52

Please sign in to comment.