Creates a new instance of the game class.
Optional
config: GameConfigOptionsThe configuration object for the game.
Readonly
configThe config object
Readonly
dataThe data manager for the game. As of v5.0.0, all data is stored here.
Readonly
eventThe event manager for the game.
Readonly
keyThe key manager for the game.
Protected
Readonly
tickersThe tickers for the game.
Protected
Static
Readonly
configThe static config manager for the game.
Adds a new attribute to the game. GameAttribute is the class. It automatically adds the attribute and attributeStatic objects to the data and static objects for saving and loading.
The name of the attribute.
Indicates whether to use boost for the attribute.
The initial value of the attribute.
The newly created attribute.
Adds a new currency section to the game. GameCurrency is the class. It automatically adds the currency and currencyStatic objects to the data and static objects for saving and loading.
The name
The upgrade names for the currency. See CurrencyStatic for more information.
The item names for the currency. See CurrencyStatic for more information.
A new instance of the gameCurrency class.
Creates a new game reset object with the specified currencies to reset.
Rest
...args: [currenciesToReset: GameCurrency<string, [], []> | GameCurrency<string, [], []>[], extender?: GameReset | GameReset[], onReset?: ((resetContext: GameReset) => void), condition?: boolean | ((resetContext: GameReset) => boolean)]The arguments for the game reset. See GameReset for more information.
The newly created game reset object.
Use the class GameReset instead. This method is a wrapper for the class and does not provide any additional functionality.
Creates a new game reset object from an object.
The object to create the game reset from.
The newly created game reset object.
Use the static method GameReset.fromObject instead. This method is a wrapper for the static method and does not provide any additional functionality.
Initializes the game. Also initializes the data manager. See DataManager.init for more information.
A game instance.