UNPKG

grid-engine

Version:

Phaser3 plugin for grid based movement on a 2D game board.

25 lines (24 loc) 786 B
import { GridCharacter } from "../../GridCharacter/GridCharacter.js"; import { Movement, MovementInfo } from "../Movement.js"; export declare class RandomMovement implements Movement { private character; private delay; private radius; private delayLeft; private initialRow; private initialCol; private stepSize; private stepsWalked; private currentMovementDirection; private distanceUtils; constructor(character: GridCharacter, delay?: number, radius?: number); init(): void; update(delta: number): void; getInfo(): MovementInfo; private shouldContinueWalkingCurrentDirection; private getFreeDirections; private isWithinRadius; private getDist; private getFreeRandomDirection; private randomizeStepSize; }