import type { Game } from './game.js'; import { Timer } from './timer.js'; export declare class Time { game: Game; time: number; prevTime: number; now: number; elapsed: number; elapsedMS: number; desiredFpsMult: number; _desiredFps: number; suggestedFps: number; advancedTiming: boolean; frames: number; fps: number; fpsMin: number; fpsMax: number; msMin: number; msMax: number; pauseDuration: number; timeToCall: number; timeExpected: number; events: Timer; _frameCount: number; _elapsedAccumulator: number; _started: number; _timeLastSecond: number; _pauseStarted: number; _justResumed: boolean; _timers: Timer[]; /** * Creates a new Time instance. * @param {Game} game - Reference to the Phaser Game instance. */ constructor(game: Game); /** * Initializes the time manager and starts tracking time. */ boot(): void; /** * Adds a Timer to the Time manager. * @param {Timer} timer - The Timer to add. * @returns {Timer} The added Timer object. */ add(timer: Timer): Timer; /** * Creates a new Timer and adds it to the Time manager. * @param {boolean} autoDestroy - Whether the timer should be automatically destroyed when it completes. * @returns {Timer} The created Timer object. */ create(autoDestroy?: boolean): Timer; /** * Removes all timers from the Time manager. */ removeAll(): void; /** * Refreshes the time tracking values. */ refresh(): void; /** * Updates the Time manager with a new timestamp. * @param {number} time - The new timestamp to use for updating. */ update(time: number): void; /** * Updates all timers managed by the Time manager. */ updateTimers(): void; /** * Updates the advanced timing values. */ updateAdvancedTiming(): void; /** * Handles game pause event. */ gamePaused(): void; /** * Handles game resume event. */ gameResumed(): void; /** * Gets the total elapsed time in seconds since the game started. * @returns {number} The total elapsed time in seconds. */ totalElapsedSeconds(): number; /** * Gets the elapsed time in milliseconds since a given timestamp. * @param {number} since - The timestamp to calculate elapsed time from. * @returns {number} The elapsed time in milliseconds. */ elapsedSince(since: number): number; /** * Gets the elapsed time in seconds since a given timestamp. * @param {number} since - The timestamp to calculate elapsed time from. * @returns {number} The elapsed time in seconds. */ elapsedSecondsSince(since: number): number; /** * Resets the time tracking values. */ reset(): void; /** * Destroys the Time manager and cleans up resources. */ destroy(): void; /** * Gets the desired frames per second. * @returns {number} The desired frames per second. */ get desiredFps(): number; /** * Sets the desired frames per second. */ set desiredFps(value: number); } //# sourceMappingURL=time.d.ts.map