dcl-npc-toolkit-ai-version
Version:
A collection of tools for creating Non-Player-Characters (NPCs). These are capable of having conversations with the player, and play different animations. AI usage is added atop of it
25 lines (24 loc) • 1.72 kB
TypeScript
import { Entity } from '@dcl/sdk/ecs';
import { Dialog, FollowPathData, ImageData, NPCData } from './types';
export declare const walkingTimers: Map<Entity, number>;
export declare const npcDataComponent: Map<Entity, any>;
export declare let NULL_NPC: Entity;
export declare let activeNPC: Entity;
export declare let blankDialog: number;
export declare function showDebug(debug: boolean): void;
export declare function getData(npc: Entity): any;
export declare function create(transform: any, data: NPCData, ragMode?: boolean, configuredMode?: boolean, serverUrl?: string, roomName?: string, serverFileUrl?: string): Entity;
export declare function followPath(npc: Entity, data?: FollowPathData): void;
export declare function stopWalking(npc: Entity, duration?: number, finished?: boolean): void;
export declare function stopPath(npc: Entity): void;
export declare function clearNPC(): void;
export declare function setActiveNPC(npc: Entity): void;
export declare function isActiveNpcSet(): boolean;
export declare function activate(npc: Entity, other: Entity): void;
export declare function handleWalkAway(npc: Entity, other: Entity): void;
export declare function playAnimation(npc: Entity, anim: string, noLoop?: boolean, duration?: number): void;
export declare function changeIdleAnim(npc: Entity, animation: string, play?: boolean): void;
export declare function talkBubble(npc: Entity, script: Dialog[], startIndex?: number | string): void;
export declare function createDialogWindow(defaultPortrait?: ImageData, sound?: string): Entity;
export declare function openDialogWindow(npc: Entity, dialog: Dialog[], startIndex?: number | string): void;
export declare function closeDialogWindow(window: Entity): void;