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

Method oneSecondCallback

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

Source from the content-addressed store, hash-verified

319 }
320
321 private oneSecondCallback(): void{
322 // If there's no last minute or it's different from the current minute
323 if(this.lastLocalAutosaveMinute == null || this.lastLocalAutosaveMinute != Math.ceil(this.getGame().getLocalAutosaveTime()/60)){
324 // We set the minute
325 this.lastLocalAutosaveMinute = Math.ceil(this.getGame().getLocalAutosaveTime()/60);
326 // We update
327 this.createSlotsArray();
328 this.update();
329 this.getGame().updatePlace();
330 }
331 }
332
333 private resize(): void{
334 // The size depends on if there's a translation or not

Callers

nothing calls this directly

Calls 5

createSlotsArrayMethod · 0.95
updateMethod · 0.95
getLocalAutosaveTimeMethod · 0.80
updatePlaceMethod · 0.80
getGameMethod · 0.45

Tested by

no test coverage detected