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

Method setCurrent

code/main/Resource.ts:90–100  ·  view source on GitHub ↗
(n: number)

Source from the content-addressed store, hash-verified

88
89 // Public setters
90 public setCurrent(n: number) : void{
91 // Set the value
92 this.current = n;
93
94 // Check if the max value should change
95 if(this.current > this.max)
96 this.max = this.current;
97
98 // Fire the callbacks
99 this.callbackCollection.fire();
100 }
101
102 // Private methods
103 private setAccumulated(n: number): void{

Callers 2

addMethod · 0.95
loadMethod · 0.95

Calls 1

fireMethod · 0.65

Tested by

no test coverage detected