UNPKG

@drincs/pixi-vn

Version:

Pixi'VN is a npm package that provides various features for creating visual novels.

67 lines (64 loc) 2.02 kB
import CharacterBaseModelProps from '../interface/CharacterBaseModelProps.mjs'; import StoredClassModel from './StoredClassModel.mjs'; /** * CharacterBaseModel is a class that is used to create a character model. * I suggest you extend this class to create your own character models. * You must use the {@link saveCharacter} function to save the character in the game. * @example * ```typescript * export const liam = new CharacterBaseModel('liam', { * name: 'Liam', * surname: 'Smith', * age: 25, * icon: "https://pixijs.com/assets/eggHead.png", * color: "#9e2e12" * }); * export const alice = new CharacterBaseModel('alice', { * name: 'Alice', * surname: 'Smith', * age: 25, * icon: "https://pixijs.com/assets/eggHead.png", * color: "#9e2e12" * }); * saveCharacter([liam, alice]); * ``` */ declare class CharacterBaseModel extends StoredClassModel implements CharacterBaseModelProps { /** * @param id The id of the character. * @param props The properties of the character. */ constructor(id: string, props: CharacterBaseModelProps); private defaultName; /*** * The name of the character. * If you set undefined, it will return the default name. */ get name(): string; set name(value: string | undefined); private defaultSurname?; /** * The surname of the character. * If you set undefined, it will return the default surname. */ get surname(): string | undefined; set surname(value: string | undefined); private defaultAge?; /** * The age of the character. * If you set undefined, it will return the default age. */ get age(): number | undefined; set age(value: number | undefined); private _icon?; /** * The icon of the character. */ get icon(): string | undefined; private _color?; /** * The color of the character. */ get color(): string | undefined; } export { CharacterBaseModel as default };