UNPKG

@drincs/pixi-vn

Version:

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

71 lines (68 loc) 2.15 kB
import CharacterBaseModelProps from '../interface/CharacterBaseModelProps.js'; import CharacterStoredClass from './CharacterStoredClass.js'; import './StoredClassModel.js'; /** * CharacterBaseModel is a class that is used to create a character model. * You must use the {@link saveCharacter} function to save the character in the game. * It is raccomended to create your own class Character, read more here: https://pixi-vn.web.app/start/character.html#custom-character * @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 CharacterStoredClass { /** * @param id The id of the character. * @param props The properties of the character. */ constructor(id: string | { id: string; emotion: 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 };