@willyuum/pixi-gameobject-system
Version:
23 lines (22 loc) • 870 B
TypeScript
import { GameObject } from "./GameObject";
/**
* Base class for all components which will allow to add game logic in
* Example: ReelRender, SpinRender, WinRender
*/
export declare class Component {
gameObject: GameObject | undefined;
private _enabled;
constructor();
onAwake(): void;
/** Called every time the component is added to the gameobject or when switching enabled value to true. */
onEnable(): void;
/** Called every time the component is removed from the gameobject or when switching enabled value to false. */
onDisable(): void;
/** Called every frame. */
onUpdate(deltaTime: number): void;
/** Properly destroys the component to allow garbage collection. */
destroy(): void;
/** Getter and setter for enabling/disabling the component */
get enabled(): boolean;
set enabled(value: boolean);
}