2018-04-09 09:35:04 +02:00
|
|
|
/**
|
|
|
|
* Entity API Object (for storing / loading entities to and from API)
|
2019-07-24 14:45:42 +02:00
|
|
|
* @param apiComponent
|
|
|
|
* @param components R3.API.Component[]
|
2018-04-09 09:35:04 +02:00
|
|
|
* @constructor
|
|
|
|
*/
|
|
|
|
R3.API.Entity = function(
|
2019-07-24 14:45:42 +02:00
|
|
|
apiComponent,
|
|
|
|
components
|
2018-04-09 09:35:04 +02:00
|
|
|
) {
|
|
|
|
|
2019-07-24 14:45:42 +02:00
|
|
|
__API_COMPONENT_MACRO__
|
2018-04-09 09:35:04 +02:00
|
|
|
|
|
|
|
if (R3.Utils.UndefinedOrNull(components)) {
|
|
|
|
components = [];
|
|
|
|
}
|
|
|
|
this.components = components;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
R3.API.Entity.prototype = Object.create(R3.API.Component.prototype);
|
|
|
|
R3.API.Entity.prototype.constructor = R3.API.Entity;
|