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

21 lines
541 B
JavaScript
Raw Normal View History

2017-01-06 16:53:53 +01:00
/**
* API Component Interface - Do not construct objects of this type directly
* @param componentType
* @param parentEntity
* @constructor
*/
GameLib.API.Component = function(
componentType,
2017-06-13 14:09:18 +02:00
parentEntity
2017-01-06 16:53:53 +01:00
) {
this.componentType = componentType;
2017-02-01 16:09:34 +01:00
2017-01-06 16:53:53 +01:00
if (GameLib.Utils.UndefinedOrNull(parentEntity)) {
parentEntity = null;
}
this.parentEntity = parentEntity;
2017-05-16 11:50:06 +02:00
2017-01-06 16:53:53 +01:00
};
GameLib.API.Component.prototype = Object.create(GameLib.Event.prototype);
2017-06-14 15:30:30 +02:00
GameLib.API.Component.prototype.constructor = GameLib.API.Component;