Update: CC - Before Render - Moorcow (9l6o7974qx.js) 247 bytes modified

beta.r3js.org
-=yb4f310 2017-11-07 00:23:08 +01:00
parent ddbaec6808
commit 072b05ef1d
1 changed files with 10 additions and 3 deletions

View File

@ -10,10 +10,11 @@ if (
this.spawnTime = 0;
var cow = GameLib.EntityManager.Instance.findComponentById('3upawmhh8j');
var burger = GameLib.EntityManager.Instance.findComponentById('psy2g7qsfx');
cow.instance.visible = false;
burger.instance.visible = false;
this.enemies = [];
GameLib.Event.Emit(
@ -38,14 +39,20 @@ if (
this.spawnEnemy = function() {
var enemyType = Math.floor((Math.random() * 5) + 1);
var meshType = Math.floor((Math.random() * 2) + 1);
var y = Math.floor((Math.random() * 10) + 2);
var apiBox = new GameLib.D3.API.Mesh();
apiBox.materials = [this.boxMaterial];
var box = cow.clone();
var box = null;
if (meshType === 1) {
box = cow.clone();
} else {
box = burger.clone();
}
box.instance.visible = true;