@drincs/pixi-vn
Version:
Pixi'VN is a npm package that provides various features for creating visual novels.
126 lines (123 loc) • 4.95 kB
TypeScript
import { LabelIdType } from '../types/LabelIdType.js';
import Label from '../classes/Label.js';
import HistoryStep, { HistoryStepData } from '../interface/HistoryStep.js';
import OpenedLabel from '../interface/OpenedLabel.js';
import ChoicesMadeType from '../types/ChoicesMadeType.js';
import '../classes/LabelAbstract.js';
import '../types/StepLabelType.js';
import '@drincs/pixi-vn';
import '../interface/LabelProps.js';
import 'deep-diff';
import 'microdiff';
import '../classes/ChoiceMenuOption.js';
import '../types/StorageElementType.js';
import '../types/CloseType.js';
import '../types/LabelRunModeType.js';
import '../interface/export/ExportedCanvas.js';
import '../types/PauseTickerType.js';
import '../interface/canvas/memory/CanvasBaseItemMemory.js';
import '../interface/canvas/memory/ContainerMemory.js';
import 'pixi.js';
import '../types/ContainerChild.js';
import '../classes/canvas/CanvasBaseItem.js';
import '../interface/TickerHistory.js';
import '../types/TickerIdType.js';
import '../interface/TickerArgs.js';
import '../interface/TickersSequence.js';
import '../types/PauseType.js';
import '../types/RepeatType.js';
import '../interface/export/ExportedSounds.js';
import '../interface/SoundOptions.js';
import '@pixi/sound';
import '../types/SoundFilterMemory.js';
import '../interface/export/ExportedStorage.js';
import '../classes/Dialogue.js';
import '../interface/CharacterInterface.js';
type AllOpenedLabelsType = {
[]: {
biggestStep: number;
openCount: number;
};
};
type CurrentStepTimesCounterMemotyData = {
lastStepIndexs?: number[];
usedRandomNumbers?: {
[]: number[];
};
stepSha1: string;
};
declare class NarrationManagerStatic {
private constructor();
static _stepsHistory: HistoryStep[];
/**
* Number of steps function that are running.
* If you run a step that have a goNext, this number is > 1.
*/
static stepsRunning: number;
/**
* Number of requests to go to the next step.
* If it is > 0, after the stepsRunning is 0, the next step will be executed
*/
static goNextRequests: number;
static cleanSteps: boolean;
static choiseMadeTemp: undefined | number;
static stepLimitSaved: number;
/**
* is a list of all labels that have been opened during the progression of the steps.
* the key is the label id and the biggest step opened.
*/
static get allOpenedLabels(): AllOpenedLabelsType;
static set allOpenedLabels(value: AllOpenedLabelsType);
static getCurrentStepTimesCounterData(nestedId?: string): CurrentStepTimesCounterMemotyData | null;
private static setCurrentStepTimesCounterData;
static getCurrentStepTimesCounter(nestedId?: string): number;
static getRandomNumber(min: number, max: number, options?: {
onceOnly?: boolean;
nestedId?: string;
}): number | undefined;
static resetCurrentStepTimesCounter(nestedId?: string): void;
/**
* is a list of all choices made by the player during the progression of the steps.
*/
static get allChoicesMade(): ChoicesMadeType[];
static set allChoicesMade(value: ChoicesMadeType[]);
static _lastStepIndex: number;
/**
* Increase the last step index that occurred during the progression of the steps.
*/
static increaseLastStepIndex(): void;
static _openedLabels: OpenedLabel[];
static get _currentLabel(): Label | undefined;
/**
* currentLabelId is the current label id that occurred during the progression of the steps.
*/
static get currentLabelId(): LabelIdType | undefined;
static get currentLabelStepIndex(): number | null;
/**
* lastHistoryStep is the last history step that occurred during the progression of the steps.
*/
static get lastHistoryStep(): HistoryStep | null;
static _originalStepData: HistoryStepData | undefined;
static get originalStepData(): HistoryStepData;
static set originalStepData(value: HistoryStepData);
/**
* Add a label to the history.
* @param label The label to add to the history.
* @param stepIndex The step index of the label.
* @param choiseMade The index of the choise made by the player. (This params is used in the choice menu)
*/
static addLabelHistory(label: LabelIdType, stepIndex: number): void;
static addChoicesMade(label: LabelIdType, stepIndex: number, stepSha: string, choiseMade: number): void;
/**
* Add a label to the history.
* @param label The label to add to the history.
*/
static pushNewLabel(label: LabelIdType): void;
/**
* Increase the current step index of the current label.
*/
static increaseCurrentStepIndex(): void;
static restoreLastLabelList(): void;
static goBackInternal(steps: number, restoredStep: HistoryStepData): HistoryStepData;
}
export { NarrationManagerStatic as default };