Interface Node<TEffect>

A node represents a single story beat - a moment where text is displayed and choices may be presented to the player.

interface Node<TEffect> {
    choices?: Choice<TEffect>[];
    effect?: TEffect;
    ending?: {
        id: string;
        label?: string;
    };
    id: string;
    tags?: string[];
    text?: string | string[];
}

Type Parameters

  • TEffect

    The type of effects that can be applied at this node

Properties

choices?: Choice<TEffect>[]
effect?: TEffect
ending?: {
    id: string;
    label?: string;
}

Type declaration

  • id: string
  • Optional label?: string
id: string
tags?: string[]
text?: string | string[]