INNER CODE UNIT · TypeScript
Amount
art-emini/DuckEngine · src/base/amount.ts:9
export default class Amount {
protected func: (currentCount: number) => void;
public reachedMaxAmount: boolean;
public game: Game;
public currentCount: number;
public readonly maxAmount: number;
/**
* @constructor
* @description Creates an Amount instance.
* @param {(currentCount: number) => void} func Callback function
* @param {number} maxAmount Max amount of times the function can be called
* @param {Game} game Game instance
* @param {boolean} [run] Determines if function is run as soon as Amount class is constructed
* @since 1.1.0
*/
constructor(