MCPcopy Create free account
hub / github.com/candybox2/candybox2.github.io / constructor

Method constructor

code/main/SuperRPGMenu_Main.ts:5–11  ·  view source on GitHub ↗
(superRPG: SuperRPG)

Source from the content-addressed store, hash-verified

3class SuperRPGMenu_Main extends SuperRPGMenu{
4 // Constructor
5 constructor(superRPG: SuperRPG){
6 super(superRPG, "places/village/thirdHouseGames/SuperRPG/mainMenu", 0);
7 this.addEntry(new SuperRPGMenuEntry("Start", new CallbackCollection(this.getSuperRPG().startGame.bind(this.getSuperRPG(), false))));
8 if(Saving.loadBool("SuperRPGUnlockedHardmode"))
9 this.addEntry(new SuperRPGMenuEntry("Start (hardmode)", new CallbackCollection(this.getSuperRPG().startGame.bind(this.getSuperRPG(), true))));
10 this.addEntry(new SuperRPGMenuEntry("Exit", new CallbackCollection(this.getSuperRPG().exitGame.bind(this.getSuperRPG()))));
11 }
12
13 // Public methods
14 public draw(renderArea: RenderArea): void{

Callers

nothing calls this directly

Calls 3

addEntryMethod · 0.80
bindMethod · 0.80
getSuperRPGMethod · 0.80

Tested by

no test coverage detected