Game entity or instance interface compatible with the Lens camera system.

interface GameInstance {
    dir?: any;
    getPos?: () => { x: number; y: number };
    height?: number;
    icon?: { height: number; width: number };
    isMoving?: boolean;
    mapName?: string;
    sprite?: { height: number; width: number };
    width?: number;
    x?: number;
    xIconOffset?: number;
    y?: number;
    yIconOffset?: number;
    [key: string]: any;
}

Indexable

  • [key: string]: any

Properties

dir?: any

Current movement direction of the entity

getPos?: () => { x: number; y: number }

Function returning current world coordinates

height?: number

Entity height in pixels

icon?: { height: number; width: number }

Entity icon graphic dimensions

isMoving?: boolean

Whether the entity is currently moving

mapName?: string

Name of the current map/world layer

sprite?: { height: number; width: number }

Entity sprite graphic dimensions

width?: number

Entity width in pixels

x?: number

World X coordinate

xIconOffset?: number

Visual X offset for the entity icon

y?: number

World Y coordinate

yIconOffset?: number

Visual Y offset for the entity icon