41 lines
922 B
JavaScript
41 lines
922 B
JavaScript
|
if (this.parentEntity === data.entity) {
|
||
|
console.log('my entity loaded :)');
|
||
|
} else {
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
this.enemies = [];
|
||
|
|
||
|
/**
|
||
|
* Min and max spawn time is in seconds
|
||
|
*/
|
||
|
GameLib.D3.CustomCode.MIN_SPAWN_TIME = 1;
|
||
|
GameLib.D3.CustomCode.MAX_SPAWN_TIME = 4;
|
||
|
|
||
|
this.beforeRender = GameLib.EntityManager.Instance.findComponentById('dywmtohrda');
|
||
|
//this.materialRusted = GameLib.EntityManager.Instance.findComponentById('0mrd2dx5np');
|
||
|
|
||
|
GameLib.Event.Emit(
|
||
|
GameLib.Event.GET_GRAPHICS_IMPLEMENTATION,
|
||
|
null,
|
||
|
function(graphics) {
|
||
|
this.graphics = graphics
|
||
|
}.bind(this)
|
||
|
);
|
||
|
|
||
|
if (
|
||
|
!this.beforeRender
|
||
|
) {
|
||
|
console.error('components not available at runtime', this);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Updates the displacement scale of materialRusted
|
||
|
*/
|
||
|
//this.updateMaterialRusted = function(totalTime) {
|
||
|
// this.materialRusted.displacementScale = Math.sin(totalTime);
|
||
|
// this.materialRusted.updateInstance();
|
||
|
//}
|
||
|
|
||
|
return null;
|
||
|
//# sourceURL=entityLoaded.js
|