r3-legacy/src/game-lib-a-api-component.js

21 lines
541 B
JavaScript

/**
* API Component Interface - Do not construct objects of this type directly
* @param componentType
* @param parentEntity
* @constructor
*/
GameLib.API.Component = function(
componentType,
parentEntity
) {
this.componentType = componentType;
if (GameLib.Utils.UndefinedOrNull(parentEntity)) {
parentEntity = null;
}
this.parentEntity = parentEntity;
};
GameLib.API.Component.prototype = Object.create(GameLib.Event.prototype);
GameLib.API.Component.prototype.constructor = GameLib.API.Component;