mwg API
    Preparing search index...

    Class StoryScreen

    A full-screen story beat: a backdrop image, a title and the text over it, advanced by a click - the campaign interlude a scenario shows between maps.

    DialogueStage is the visual-novel model: characters standing on a backdrop, a box under them doing the talking. This is the other shape an interlude needs and that one is not - one page of prose filling the screen, no cast, page forward on any input - so it reuses the same Label everything else lays words out with and leaves the sequencing to StorySequence, the part worth testing without a renderer. Feeding it MwlWorld.story from an .mwl scenario is the intended use: both carry the same { text, title, image, music } shape.

    import { StoryScreen, StorySequence } from '@datamoc/mw_games/two-d/stage';

    const sequence = new StorySequence([{ title: 'Prologue', text: 'The war begins.' }]);
    const screen = new StoryScreen({ sequence, width: 960, height: 540 });
    console.log(screen.current?.title); // 'Prologue'

    Hierarchy

    • Container
      • StoryScreen
    Index
    sequence: StorySequence
    • Removes all internal references and listeners as well as removes children from the display list. Do not use a Container after calling destroy.

      Parameters

      • Optionaloptions: DestroyOptions

        Options parameter. A boolean will act as if all options have been set to that value

      Returns void

      container.destroy();
      container.destroy(true);
      container.destroy({ children: true });
      container.destroy({ children: true, texture: true, textureSource: true });