full generation and upgrade rules revamp
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { makeGame, ResourceGenerator, ResourceSet } from "@idle-economy/engine";
|
||||
import { makeAutoObservable } from "mobx";
|
||||
import { Notation, Presets } from 'eternal_notations';
|
||||
import { now } from "../tools/time";
|
||||
|
||||
export class Root {
|
||||
|
||||
@@ -9,6 +10,8 @@ export class Root {
|
||||
public resources: ResourceSet = new ResourceSet();
|
||||
public generators: ResourceGenerator[] = [];
|
||||
|
||||
public lastGameTime = now();
|
||||
|
||||
public readonly availableNotationNames: string[] = Object.keys(Presets).filter((n: any) => !!(Presets as any)[n].name).sort();
|
||||
public numberNotationName: keyof typeof Presets = 'Standard';
|
||||
public numberNotation: Notation = Presets.Standard;
|
||||
@@ -19,6 +22,10 @@ export class Root {
|
||||
|
||||
makeAutoObservable(this);
|
||||
}
|
||||
|
||||
public setLastGameTime(value: number) {
|
||||
this.lastGameTime = value;
|
||||
}
|
||||
|
||||
public tick(deltaTime: number): void {
|
||||
Array.from(this.game.tick(deltaTime));
|
||||
|
||||
Reference in New Issue
Block a user