sdk7-npc-utils
Version:
A collection of helpers to make it easier to build a Decentraland scene using the SDK 7.
15 lines (14 loc) • 932 B
TypeScript
import { Entity, TransformType } from '@dcl/sdk/ecs';
import { FollowPathData, NPCData } from './types';
export declare const walkingTimers: Map<Entity, number>;
export declare const npcDataComponent: Map<Entity, any>;
export declare let activeNPC: number;
export declare function showDebug(debug: boolean): void;
export declare function getData(npc: Entity): any;
export declare function create(transform: TransformType, data: NPCData): Entity;
export declare function followPath(npc: Entity, data?: FollowPathData): void;
export declare function stopWalking(npc: Entity, duration?: number, finished?: boolean): void;
export declare function activate(npc: Entity): void;
export declare function handleWalkAway(npc: Entity): void;
export declare function playAnimation(npc: Entity, anim: string, loop?: boolean, duration?: number): void;
export declare function changeIdleAnim(npc: Entity, animation: string, play?: boolean): void;