UNPKG

narraleaf-react

Version:

A React visual novel player framework

20 lines (19 loc) 1.22 kB
import { CharacterActionContentType, CharacterActionTypes } from "../../action/actionTypes"; import type { Character } from "../../elements/character"; import { GameState } from "../../../player/gameState"; import { Sentence } from "../../elements/character/sentence"; import { TypedAction } from "../../action/actions"; import { Sound } from "../../elements/sound"; import { ActionExecutionInjection, ExecutedActionResult } from "../../action/action"; import { LogicAction } from "../../action/logicAction"; import { Story } from "../../elements/story"; export declare class CharacterAction<T extends typeof CharacterActionTypes[keyof typeof CharacterActionTypes] = typeof CharacterActionTypes[keyof typeof CharacterActionTypes]> extends TypedAction<CharacterActionContentType, T, Character> { static ActionTypes: { readonly say: "character:say"; readonly action: "character:action"; readonly setName: "character:setName"; }; static getVoice(state: GameState, sentence: Sentence): Sound | null; executeAction(gameState: GameState, injection: ActionExecutionInjection): ExecutedActionResult; stringify(_story: Story, _seen: Set<LogicAction.Actions>, _strict: boolean): string; }