Define ProgressBarTask Interface.

interface IProgressBarTask {
    currentProgress: number;
    description: string;
    id: number;
    isCompleted: boolean;
    quest: IQuest;
    totalProgress: number;
    type: CompletionTypes;
    addProgress(increment?: number): void;
    fire<T>(event: T, ...args?: any[]): EventHandler;
    off<T>(event: T, listener: IProgressBarTaskEvents[T]): EventHandler;
    on<T>(event: T, listener: IProgressBarTaskEvents[T]): EventHandle;
}

Hierarchy (view full)

Properties

currentProgress: number

The current progress step.

description: string

The description of the task.

id: number

The ID of the task.

isCompleted: boolean

Whether the task is completed.

quest: IQuest

The parent quest of the task.

totalProgress: number

The total progress steps needed to complete the task.

The type of the task.

Methods

  • Update the progress of the task.

    Parameters

    • Optionalincrement: number

      Optional increment value. If not provided, the progress is incremented by 1.

    Returns void