@drincs/pixi-vn 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -33,8 +33,8 @@ declare class CanvasEvent<C> {
|
|
|
33
33
|
* I suggest you extend this class to create your own stored class.
|
|
34
34
|
* @example
|
|
35
35
|
* ```typescript
|
|
36
|
-
* export class CharacterBaseModel extends StoredClassModel implements
|
|
37
|
-
* constructor(id: string, props:
|
|
36
|
+
* export class CharacterBaseModel extends StoredClassModel implements CharacterBaseModelProps {
|
|
37
|
+
* constructor(id: string, props: CharacterBaseModelProps) {
|
|
38
38
|
* super("___character___", id)
|
|
39
39
|
* this.defaultName = props.name
|
|
40
40
|
* this.defaultSurname = props.surname
|
|
@@ -82,7 +82,7 @@ declare class StoredClassModel {
|
|
|
82
82
|
getStorageProperty<T>(propertyName: string): T | undefined;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
interface
|
|
85
|
+
interface CharacterBaseModelProps {
|
|
86
86
|
name: string;
|
|
87
87
|
surname?: string;
|
|
88
88
|
age?: number;
|
|
@@ -112,8 +112,8 @@ interface ICharacterBaseModel {
|
|
|
112
112
|
* saveCharacter([liam, alice]);
|
|
113
113
|
* ```
|
|
114
114
|
*/
|
|
115
|
-
declare class CharacterBaseModel extends StoredClassModel implements
|
|
116
|
-
constructor(id: string, props:
|
|
115
|
+
declare class CharacterBaseModel extends StoredClassModel implements CharacterBaseModelProps {
|
|
116
|
+
constructor(id: string, props: CharacterBaseModelProps);
|
|
117
117
|
private defaultName;
|
|
118
118
|
get name(): string;
|
|
119
119
|
set name(value: string);
|
|
@@ -232,7 +232,7 @@ interface IStoratedChoiceMenuOptionLabel {
|
|
|
232
232
|
* Base class for all dialogue models. I suggest you extend this class to create your own dialogue models.
|
|
233
233
|
*/
|
|
234
234
|
declare class DialogueBaseModel {
|
|
235
|
-
constructor(text: string,
|
|
235
|
+
constructor(text: string, character: string | CharacterBaseModel | undefined);
|
|
236
236
|
/**
|
|
237
237
|
* The text of the dialogue.
|
|
238
238
|
*/
|
|
@@ -1557,4 +1557,4 @@ declare class GameWindowManager {
|
|
|
1557
1557
|
static import(data: object): void;
|
|
1558
1558
|
}
|
|
1559
1559
|
|
|
1560
|
-
export { CanvasBase, CanvasContainer, CanvasEvent, type CanvasEventNamesType, CanvasImage, CanvasSprite, CanvasText, CharacterBaseModel, ChoiceMenuOptionLabel, type ChoiceMenuOptionsType, DialogueBaseModel, type ExportedCanvas, type ExportedStep, type ExportedStorage, GameStepManager, GameStorageManager, GameWindowManager, type ICanvasBaseMemory, type ICanvasContainerMemory, type ICanvasImageMemory, type ICanvasSpriteBaseMemory, type ICanvasSpriteMemory, type ICanvasTextMemory as ICanvasTextTextMemory, type IClassWithArgsHistory, type IClassWithArgsHistoryForExport, type IDialogueHistory, type IHistoryStep, type IHistoryStepData, type IOpenedLabel, type ISaveData, type ITextureMemory, type ITicker, type ITickersSteps, Label, LabelRunModeEnum, Pause, type PauseType, PauseValueType, Repeat, type RepeatType, type StepLabelType, type StorageElementType, StoredClassModel, TickerBase, TickerFadeAlpha, type TickerProgrationType, TickerRotate, addImage, canvasElementDecorator, clearAllGameDatas, clearChoiceMenuOptions, clearDialogue, eventDecorator, getAllCharacters, getCharacterById, getChoiceMenuOptions, getDialogue, getDialogueHistory, getFlag, getSaveData, getSaveJson, getTexture, labelDecorator, loadSaveData, loadSaveJson, removeCanvasElement, saveCharacter, setChoiceMenuOptions, setDialogue, setFlag, showCanvasImages, showImageWithDissolveTransition, tickerDecorator };
|
|
1560
|
+
export { CanvasBase, CanvasContainer, CanvasEvent, type CanvasEventNamesType, CanvasImage, CanvasSprite, CanvasText, CharacterBaseModel, type CharacterBaseModelProps, ChoiceMenuOptionLabel, type ChoiceMenuOptionsType, DialogueBaseModel, type ExportedCanvas, type ExportedStep, type ExportedStorage, GameStepManager, GameStorageManager, GameWindowManager, type ICanvasBaseMemory, type ICanvasContainerMemory, type ICanvasImageMemory, type ICanvasSpriteBaseMemory, type ICanvasSpriteMemory, type ICanvasTextMemory as ICanvasTextTextMemory, type IClassWithArgsHistory, type IClassWithArgsHistoryForExport, type IDialogueHistory, type IHistoryStep, type IHistoryStepData, type IOpenedLabel, type ISaveData, type ITextureMemory, type ITicker, type ITickersSteps, Label, LabelRunModeEnum, Pause, type PauseType, PauseValueType, Repeat, type RepeatType, type StepLabelType, type StorageElementType, StoredClassModel, TickerBase, TickerFadeAlpha, type TickerProgrationType, TickerRotate, addImage, canvasElementDecorator, clearAllGameDatas, clearChoiceMenuOptions, clearDialogue, eventDecorator, getAllCharacters, getCharacterById, getChoiceMenuOptions, getDialogue, getDialogueHistory, getFlag, getSaveData, getSaveJson, getTexture, labelDecorator, loadSaveData, loadSaveJson, removeCanvasElement, saveCharacter, setChoiceMenuOptions, setDialogue, setFlag, showCanvasImages, showImageWithDissolveTransition, tickerDecorator };
|
package/dist/index.d.ts
CHANGED
|
@@ -33,8 +33,8 @@ declare class CanvasEvent<C> {
|
|
|
33
33
|
* I suggest you extend this class to create your own stored class.
|
|
34
34
|
* @example
|
|
35
35
|
* ```typescript
|
|
36
|
-
* export class CharacterBaseModel extends StoredClassModel implements
|
|
37
|
-
* constructor(id: string, props:
|
|
36
|
+
* export class CharacterBaseModel extends StoredClassModel implements CharacterBaseModelProps {
|
|
37
|
+
* constructor(id: string, props: CharacterBaseModelProps) {
|
|
38
38
|
* super("___character___", id)
|
|
39
39
|
* this.defaultName = props.name
|
|
40
40
|
* this.defaultSurname = props.surname
|
|
@@ -82,7 +82,7 @@ declare class StoredClassModel {
|
|
|
82
82
|
getStorageProperty<T>(propertyName: string): T | undefined;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
interface
|
|
85
|
+
interface CharacterBaseModelProps {
|
|
86
86
|
name: string;
|
|
87
87
|
surname?: string;
|
|
88
88
|
age?: number;
|
|
@@ -112,8 +112,8 @@ interface ICharacterBaseModel {
|
|
|
112
112
|
* saveCharacter([liam, alice]);
|
|
113
113
|
* ```
|
|
114
114
|
*/
|
|
115
|
-
declare class CharacterBaseModel extends StoredClassModel implements
|
|
116
|
-
constructor(id: string, props:
|
|
115
|
+
declare class CharacterBaseModel extends StoredClassModel implements CharacterBaseModelProps {
|
|
116
|
+
constructor(id: string, props: CharacterBaseModelProps);
|
|
117
117
|
private defaultName;
|
|
118
118
|
get name(): string;
|
|
119
119
|
set name(value: string);
|
|
@@ -232,7 +232,7 @@ interface IStoratedChoiceMenuOptionLabel {
|
|
|
232
232
|
* Base class for all dialogue models. I suggest you extend this class to create your own dialogue models.
|
|
233
233
|
*/
|
|
234
234
|
declare class DialogueBaseModel {
|
|
235
|
-
constructor(text: string,
|
|
235
|
+
constructor(text: string, character: string | CharacterBaseModel | undefined);
|
|
236
236
|
/**
|
|
237
237
|
* The text of the dialogue.
|
|
238
238
|
*/
|
|
@@ -1557,4 +1557,4 @@ declare class GameWindowManager {
|
|
|
1557
1557
|
static import(data: object): void;
|
|
1558
1558
|
}
|
|
1559
1559
|
|
|
1560
|
-
export { CanvasBase, CanvasContainer, CanvasEvent, type CanvasEventNamesType, CanvasImage, CanvasSprite, CanvasText, CharacterBaseModel, ChoiceMenuOptionLabel, type ChoiceMenuOptionsType, DialogueBaseModel, type ExportedCanvas, type ExportedStep, type ExportedStorage, GameStepManager, GameStorageManager, GameWindowManager, type ICanvasBaseMemory, type ICanvasContainerMemory, type ICanvasImageMemory, type ICanvasSpriteBaseMemory, type ICanvasSpriteMemory, type ICanvasTextMemory as ICanvasTextTextMemory, type IClassWithArgsHistory, type IClassWithArgsHistoryForExport, type IDialogueHistory, type IHistoryStep, type IHistoryStepData, type IOpenedLabel, type ISaveData, type ITextureMemory, type ITicker, type ITickersSteps, Label, LabelRunModeEnum, Pause, type PauseType, PauseValueType, Repeat, type RepeatType, type StepLabelType, type StorageElementType, StoredClassModel, TickerBase, TickerFadeAlpha, type TickerProgrationType, TickerRotate, addImage, canvasElementDecorator, clearAllGameDatas, clearChoiceMenuOptions, clearDialogue, eventDecorator, getAllCharacters, getCharacterById, getChoiceMenuOptions, getDialogue, getDialogueHistory, getFlag, getSaveData, getSaveJson, getTexture, labelDecorator, loadSaveData, loadSaveJson, removeCanvasElement, saveCharacter, setChoiceMenuOptions, setDialogue, setFlag, showCanvasImages, showImageWithDissolveTransition, tickerDecorator };
|
|
1560
|
+
export { CanvasBase, CanvasContainer, CanvasEvent, type CanvasEventNamesType, CanvasImage, CanvasSprite, CanvasText, CharacterBaseModel, type CharacterBaseModelProps, ChoiceMenuOptionLabel, type ChoiceMenuOptionsType, DialogueBaseModel, type ExportedCanvas, type ExportedStep, type ExportedStorage, GameStepManager, GameStorageManager, GameWindowManager, type ICanvasBaseMemory, type ICanvasContainerMemory, type ICanvasImageMemory, type ICanvasSpriteBaseMemory, type ICanvasSpriteMemory, type ICanvasTextMemory as ICanvasTextTextMemory, type IClassWithArgsHistory, type IClassWithArgsHistoryForExport, type IDialogueHistory, type IHistoryStep, type IHistoryStepData, type IOpenedLabel, type ISaveData, type ITextureMemory, type ITicker, type ITickersSteps, Label, LabelRunModeEnum, Pause, type PauseType, PauseValueType, Repeat, type RepeatType, type StepLabelType, type StorageElementType, StoredClassModel, TickerBase, TickerFadeAlpha, type TickerProgrationType, TickerRotate, addImage, canvasElementDecorator, clearAllGameDatas, clearChoiceMenuOptions, clearDialogue, eventDecorator, getAllCharacters, getCharacterById, getChoiceMenuOptions, getDialogue, getDialogueHistory, getFlag, getSaveData, getSaveJson, getTexture, labelDecorator, loadSaveData, loadSaveJson, removeCanvasElement, saveCharacter, setChoiceMenuOptions, setDialogue, setFlag, showCanvasImages, showImageWithDissolveTransition, tickerDecorator };
|
package/dist/index.js
CHANGED
|
@@ -2431,13 +2431,17 @@ var ChoiceMenuOptionLabel = class {
|
|
|
2431
2431
|
|
|
2432
2432
|
// src/classes/DialogueBaseModel.ts
|
|
2433
2433
|
var DialogueBaseModel = class {
|
|
2434
|
-
constructor(text,
|
|
2434
|
+
constructor(text, character) {
|
|
2435
2435
|
/**
|
|
2436
2436
|
* The text of the dialogue.
|
|
2437
2437
|
*/
|
|
2438
2438
|
this.text = "";
|
|
2439
2439
|
this.text = text;
|
|
2440
|
-
|
|
2440
|
+
if (typeof character === "string") {
|
|
2441
|
+
this.characterId = character;
|
|
2442
|
+
} else {
|
|
2443
|
+
this.characterId = character == null ? void 0 : character.id;
|
|
2444
|
+
}
|
|
2441
2445
|
}
|
|
2442
2446
|
};
|
|
2443
2447
|
|