UNPKG

@moderrkowo/jsgl

Version:

Client-side JavaScript library for creating web 2D games. Focusing at objective game.

27 lines (26 loc) 778 B
import { DrawEvent } from '../events/DrawEvent'; import { GameObject } from './GameObject'; /** * Represents drawable game object * @group Game Objects */ export declare class DrawableGameObject extends GameObject { static IsTouching(gameObject: DrawableGameObject, anotherGameObject: DrawableGameObject): boolean; /** * Defines is this game object visible in game. * @property */ visible: boolean; /** * Invoked at frame when drawing * @method * @param event - {@link DrawEvent} * @virtual * @example * OnDraw(event){ * event.renderer.drawRectangle(0, 0, 1, 1); * } */ OnDraw(event: DrawEvent): void; isTouching(anotherGameObject: DrawableGameObject): boolean; }