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

Method update

code/main/Save.ts:355–373  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

353 }
354
355 private update(): void{
356 var yPosition: number = 0; // The y position where we will add things. Can be incremented sometimes, depending on the user's language..
357
358 // Erase everything
359 this.renderArea.resetAllButSize();
360
361 // Saving
362 this.renderArea.drawArray(Database.getAscii("text/Saving"), 50 - Math.floor((Database.getAsciiWidth("text/Saving")/2)), yPosition);
363 yPosition += this.drawLocalSave(0, yPosition+7);
364 yPosition += this.drawFileSave(0, yPosition+21);
365
366 // Loading
367 this.renderArea.drawArray(Database.getAscii("text/Loading"), 50 - Math.floor((Database.getAsciiWidth("text/Loading")/2)), yPosition+40);
368 yPosition += this.drawLocalLoad(0, yPosition+47);
369 yPosition += this.drawFileLoad(0, yPosition+59);
370
371 // Add the link which will call the selectRightSlot method after the html dom is created
372 this.renderArea.addLinkCallbackCollection(new CallbackCollection(this.selectRightSlot.bind(this)));
373 }
374}

Callers 7

constructorMethod · 0.95
clickedAutosaveMethod · 0.95
clickedFileSaveMethod · 0.95
clickedSaveMethod · 0.95
oneSecondCallbackMethod · 0.95
slotSelectedMethod · 0.95

Calls 9

drawLocalSaveMethod · 0.95
drawFileSaveMethod · 0.95
drawLocalLoadMethod · 0.95
drawFileLoadMethod · 0.95
resetAllButSizeMethod · 0.80
drawArrayMethod · 0.80
getAsciiMethod · 0.80
bindMethod · 0.80

Tested by

no test coverage detected