import { TweenTools } from "../../tween_tools"; type FrameTimerCallback = (time_passed: number, delta_time: number) => void; type SteppingEvent = RBXScriptSignal<(delta_time: number) => void>; declare class Builder { static Create(): Builder; private timer_; private auto_start_; WithTimer(callback: (timer: FrameTimer) => void): this; WithWaitTime(value: number): this; WithOneShot(value: boolean): this; WithUpdateCallback(callback: FrameTimerCallback): this; WithTimeOutCallback(callback: (connection?: RBXScriptConnection) => void, with_connection?: (connection: RBXScriptConnection) => void): this; WithAutoStart(): this; WithSteppingMethod(stepping_event: SteppingEvent): void; Build(): FrameTimer; } type CallableBuilder = typeof Builder & { (): Builder; }; export declare class FrameTimer { static Builder: CallableBuilder; static CreateCustomTweenTemplate(start_value: T, target_value: T, wait_time: number, create_new_alpha_generator: () => (alpha: number, delta_time: number, time_passed: number, wait_time: number) => number, auto_start?: boolean): (callback: (value: T) => void) => FrameTimer; static CreateTweenTemplate(start_value: T, target_value: T, wait_time: number, auto_start?: boolean, easing_style?: Enum.EasingStyle, easing_direction?: Enum.EasingDirection): (callback: (value: T) => void) => FrameTimer; static CreateTween(start_value: T, target_value: T, wait_time: number, set_function: (new_value: T) => void, auto_start?: boolean, easing_style?: Enum.EasingStyle, easing_direction?: Enum.EasingDirection): FrameTimer; /** * * @param start_value * @param target_value * @param wait_time * @param create_new_alpha_generator creates a callback that will provide new alpha from existing like TweenService.GetValue * @param set_function * @param auto_start * @returns */ static CreateCustomTween(start_value: T, target_value: T, wait_time: number, create_new_alpha_generator: () => (alpha: number, delta_time: number, time_passed: number, wait_time: number) => number, set_function: (new_value: T) => void, auto_start?: boolean): FrameTimer; WaitTime: number; private time_left_; GetTimeLeft(): number; private initialized_wait_time_; /** * if one_shot if true, the timer will work only once and will stop * if false timer works until the manual Stop() * * default is true */ OneShot: boolean; Paused: boolean; private stopped_; IsStopped(): boolean; private time_out_event_; readonly OnTimeOut: RBXScriptSignal; private update_connection_?; private update_callback_; /** * @param time_passed time passed since the start of the timer * @param callback callback that will be executed each frame */ SetUpdateCallback(callback: FrameTimerCallback): this; /** * update event, defaults to RunService.Heartbeat */ private stepping_event_; SetSteppingEvent(stepping_event: SteppingEvent): this; Start(time_sec?: number): this; /** * yields the thread til the timer has finished * @param ignore_if_stopped if false, yields til the timer will fire on_time_out even if stopped, defaults to true */ Await(ignore_if_stopped?: boolean): this; private Update; Stop(): this | undefined; Destroy(): void; } export {};