UNPKG

bp-prism-game

Version:
77 lines (76 loc) 1.88 kB
import { IAsset } from '../../interface/asset.interface'; import { GameService } from '../../service/game.service'; import { AssetClass } from '../../asset/asset.class'; import { ImageLocationModel } from '../../model/image/image-location.model'; /** * The Alien Class */ export declare abstract class AlienClass extends AssetClass { /** * The alien moves for debug */ protected nextMove: IAsset; /** * The alien moves for debug */ protected allMoves: IAsset[]; /** * The alien speed number */ private alienSpeed; /** * The current alien */ protected currentAlien: ImageLocationModel; /** * All the East facing aliens */ protected eastAlienImages: ImageLocationModel[]; /** * All the West facing aliens */ protected westAlienImages: ImageLocationModel[]; /** * All the North facing aliens */ protected northAlienImages: ImageLocationModel[]; /** * The Asset Timmer */ private alienAssetTimer; /** * The Current Alien Direction */ private currentAlienDirection; /** * The original alien speed */ private originamAlienSpeed; /** * Constructor * @param gameService The GameService * @param ctx The ctx * @param guid The guid of the alien */ constructor(gameService: GameService, ctx: CanvasRenderingContext2D, guid: number); /** * Determine the path of the creep * * @param moves All the moves of the creep */ setCreepPath(moves: IAsset[]): void; /** * Set the creep speed * @param speed The speed to set */ setCreepSpeed(speed: number): void; /** * Draw the alien */ protected draw(): void; /** * Animate the alien * @param now the current time */ animate(now?: number): void; }