@moderrkowo/jsgl
Version:
Client-side JavaScript library for creating web 2D games. Focusing at objective game.
38 lines (37 loc) • 1.09 kB
TypeScript
import { GameMouseEvent } from '../events/GameMouseEvent';
import { DrawableGameObject } from './DrawableGameObject';
/**
* Represents clickable and drawable game object
* @group Game Objects
*/
export declare class ClickableGameObject extends DrawableGameObject {
/**
* Defines is this game object has hitbox visible in game.
* @property
*/
showHitbox: boolean;
/**
* Defines is this game object ignoring mouse events.
* @property
*/
ignoreRaycast: boolean;
/**
* Invoked at click on drawed game object
* @virtual
*/
OnMouseClick(event: GameMouseEvent): void;
OnMouseUp(event: GameMouseEvent): void;
OnMouseDown(event: GameMouseEvent): void;
/**
* Invoked at hover start on drawed game object
* @returns is handled?
* @virtual
*/
OnMouseHoverStart(event: GameMouseEvent): void;
/**
* Invoked at hover end on drawed game object
* @returns is handled?
* @virtual
*/
OnMouseHoverEnd(event: GameMouseEvent): void;
}