@drincs/nqtr
Version:
A complete system introducing the concepts of location, time and event, producing the framework of a not-quite-point-and-click adventure game.
64 lines (61 loc) • 2 kB
text/typescript
import ActivityInterface from '../interface/ActivityInterface.mjs';
import ActivityProps from '../interface/ActivityProps.mjs';
import { OnRunEvent } from '../types/OnRunEvent.mjs';
import ActivityStoredClass from './ActivityStoredClass.mjs';
import '@drincs/nqtr';
import '@drincs/pixi-vn';
/**
* The activity model. It is used to create an activity.
* @example
* ```tsx
* export const nap = new ActivityModel("nap",
* (_, event) => {
* if (event) {
* event.navigate("/game")
* callLabelWithGoNavigationCallBack(napLabel, event)
* }
* else {
* console.error("Event is undefined")
* }
* },
* {
* name: "Nap",
* fromHour: 5,
* toHour: 23,
* icon: "https://icon.jpg",
* }
* )
* ```
*/
declare class ActivityBaseModel extends ActivityStoredClass<ActivityInterface> {
/**
* @param id The activity id, that must be unique.
* @param onRun The function that is called when the activity is runned. Have 2 parameters: the runned activity and the yourParams object, that is an object with the parameters that you want to pass to the onRun function.
* @param props The activity properties.
*/
constructor(id: string, onRun: OnRunEvent<ActivityInterface>, props: ActivityProps);
private defaultName;
/**
* The name of the activity.
*/
get name(): string;
set name(value: string | undefined);
private defaultDisabled;
/**
* Whether is disabled. If it is a string, it is a Pixi'VN flag name.
*/
get disabled(): boolean;
set disabled(value: boolean | string);
private defaultHidden;
/**
* Whether is hidden. If it is a string, it is a Pixi'VN flag name.
*/
get hidden(): boolean;
set hidden(value: boolean | string);
private _icon?;
/**
* The icon of the activity.
*/
get icon(): string | undefined;
}
export { ActivityBaseModel as default };