r3-custom-code/gr0qs6v7dd.js

52 lines
1.5 KiB
JavaScript
Raw Normal View History

if (this.parentEntity === data.entity) {
console.log('my entity loaded :)');
} else {
return;
}
this.enemies = [];
var particle = GameLib.EntityManager.Instance.findComponentById('tiqzsk65l0');
particle.instance.visible = false;
/**
* Min and max spawn time is in seconds
*/
GameLib.D3.CustomCode.MIN_SPAWN_TIME = 1;
GameLib.D3.CustomCode.MAX_SPAWN_TIME = 4;
/**
* Tell all our custom code components that we loaded
*/
this.beforeRender = GameLib.EntityManager.Instance.findComponentById('9l6o7974qx');
this.beforeRender.entityLoaded = this;
this.mouseUp = GameLib.EntityManager.Instance.findComponentById('7vjcf5lwek');
this.mouseUp.entityLoaded = this;
this.mouseDown = GameLib.EntityManager.Instance.findComponentById('yfdl3odo4j');
this.mouseDown.entityLoaded = this;
this.mouseMove = GameLib.EntityManager.Instance.findComponentById('fsilsam72g');
this.mouseMove.entityLoaded = this;
/**
* Plant all our trees
*/
var treeSmall = GameLib.EntityManager.Instance.findComponentById('ctofpaaxhc');
var treeMedium = GameLib.EntityManager.Instance.findComponentById('48l6qb40bl');
var treeLarge = GameLib.EntityManager.Instance.findComponentById('owjdksm134');
var scene = GameLib.EntityManager.Instance.findComponentById('lpdxa66480');
var i = 0;
var tempTree = null;
for (i = 0; i <= Math.PI / 2; i += 0.1) {
tempTree = treeLarge.cloneInstance();
tempTree.position.x = Math.sin(i) * 10;
tempTree.position.z = Math.cos(i) * 10;
}
//@ sourceURL = entityLoaded.js