UNPKG

duckengine

Version:
31 lines (30 loc) 910 B
import Game from '../game'; import GameObject from './gameObject'; import Scene from '../scene'; /** * @class Rect * @classdesc Creates a DuckEngine Rect * @description The Rect Class. Represents a rectangle * @since 1.0.0-beta */ export default class Rect extends GameObject<'color'> { /** * @constructor Rect * @param {number} x X position * @param {number} y Y position * @param {number} w Width of Rect * @param {number} h Height of Rect * @param {string} fillColor Fill Color of Rect * @param {Game} game Game instance * @param {Scene} scene Scene instance * @since 1.0.0-beta */ constructor(x: number, y: number, w: number, h: number, fillColor: string, game: Game, scene: Scene); /** * @description Draws the rect. * * DO NOT CALL MANUALLY, CALLED IN GAME LOOP USING SCENE.displayList * */ _draw(): void; }