duckengine
Version:
A 2D Game Engine for the web.
44 lines (43 loc) • 1.48 kB
TypeScript
import { Duck } from '../../index';
import Game from '../game';
import GameObject from '../gameobjects/gameObject';
import Scene from '../scene';
/**
* @class StaticLight
* @classdesc Creates a DuckEngine StaticLight
* @description The StaticLight Class. A static light
* @extends GameObject<'color'>
* @since 1.0.0-beta
*/
export default class StaticLight extends GameObject<'color'> {
protected color: string;
protected alpha: Duck.Types.Helper.AlphaRange;
/**
* @constructor StaticLight
* @description Creates an instance of a StaticLight
* @param {number} x X position
* @param {number} y Y position
* @param {number} r Radius
* @param {string} fillColor Color
* @param {Duck.Types.Helper.AlphaRange} alpha Alpha
* @param {Game} game Game instance
* @param {Scene} scene Scene instance
* @since 1.0.0-beta
*/
constructor(x: number, y: number, r: number, fillColor: string, alpha: Duck.Types.Helper.AlphaRange, game: Game, scene: Scene);
/**
* @description Draws the StaticLight.
*
* DO NOT CALL MANUALLY, CALLED IN GAME LOOP USING SCENE.displayList
*
*/
_draw(): void;
/**
* @memberof StaticLight
* @description Sets the fillColor with alpha
* @param {string} color Fill Color
* @param {Duck.Types.Helper.AlphaRange} alpha Alpha
* @since 2.0.0
*/
setFillColorAlpha(color: string, alpha: Duck.Types.Helper.AlphaRange): void;
}