画面上に表示されるコメントを生成します.

CommentSupplierBuilder を使ってインスタンスを作成してください.

interface CommentSupplier {
    comments: readonly CommentSchema[];
    deployers: readonly CommentDeployer[];
    interval: number;
    onSupply: Trigger<string>;
    status: CommentSupplierStatus;
    vars?: unknown;
    addDeployer(deployer: CommentDeployer): void;
    fetch(context: CommentContext): string[];
    start(contextSupplier: CommentContextSupplier): void;
}

Properties

comments: readonly CommentSchema[]

登録された全コメント.

deployers: readonly CommentDeployer[]

生成されたコメントを画面上に配置する CommentDeployer 一覧

interval: number

コメントの生成間隔 (ミリ秒).

onSupply: Trigger<string>

コメントが生成された際に発火するトリガ

現在の状態

vars?: unknown

ライブラリ利用者が自由に使えるフィールドです.

Methods

  • 生成されたコメントを画面上に配置する CommentDeployer を登録します.

    Parameters

    • deployer: CommentDeployer

      生成されたコメントを画面上に配置する CommentDeployer

    Returns void

  • Internal

    現在の tick におけるコメントを生成します. ライブラリ利用者は本メソッドを呼び出す必要はありません. 自動的に呼び出されます.

    Parameters

    • context: CommentContext

      コメント生成条件の判定に使用する環境情報

    Returns string[]