mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 07:01:20 +00:00
added RandomDataGenerator.state() typescript definitions
This commit is contained in:
parent
5703178ee4
commit
4a0aaa8914
2 changed files with 19 additions and 0 deletions
18
typescript/phaser.comments.d.ts
vendored
18
typescript/phaser.comments.d.ts
vendored
|
@ -20512,6 +20512,24 @@ declare module Phaser {
|
|||
*/
|
||||
sow(seeds: number[]): void;
|
||||
|
||||
/**
|
||||
* Gets or Sets the state of the generator. This allows you to retain the values
|
||||
* that the generator is using between games, i.e. in a game save file.
|
||||
*
|
||||
* To seed this generator with a previously saved state you can pass it as the
|
||||
* `seed` value in your game config, or call this method directly after Phaser has booted.
|
||||
*
|
||||
* Call this method with no parameters to return the current state.
|
||||
*
|
||||
* If providing a state it should match the same format that this method
|
||||
* returns, which is a string with a header `!rnd` followed by the `c`,
|
||||
* `s0`, `s1` and `s2` values respectively, each comma-delimited.
|
||||
*
|
||||
* @param state Generator state to be set.
|
||||
* @return The current state of the generator.
|
||||
*/
|
||||
state(state: string): string;
|
||||
|
||||
/**
|
||||
* Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified.
|
||||
*
|
||||
|
|
1
typescript/phaser.d.ts
vendored
1
typescript/phaser.d.ts
vendored
|
@ -3803,6 +3803,7 @@ declare module Phaser {
|
|||
real(): number;
|
||||
realInRange(min: number, max: number): number;
|
||||
sow(seeds: number[]): void;
|
||||
state(state: string): string;
|
||||
timestamp(min: number, max: number): number;
|
||||
uuid(): number;
|
||||
weightedPick<T>(ary: T[]): T;
|
||||
|
|
Loading…
Reference in a new issue