Update: CC - Before Render - Moorcow (9l6o7974qx.js) 247 bytes modified
parent
ddbaec6808
commit
072b05ef1d
|
@ -10,9 +10,10 @@ if (
|
||||||
this.spawnTime = 0;
|
this.spawnTime = 0;
|
||||||
|
|
||||||
var cow = GameLib.EntityManager.Instance.findComponentById('3upawmhh8j');
|
var cow = GameLib.EntityManager.Instance.findComponentById('3upawmhh8j');
|
||||||
|
var burger = GameLib.EntityManager.Instance.findComponentById('psy2g7qsfx');
|
||||||
|
|
||||||
cow.instance.visible = false;
|
cow.instance.visible = false;
|
||||||
|
burger.instance.visible = false;
|
||||||
|
|
||||||
this.enemies = [];
|
this.enemies = [];
|
||||||
|
|
||||||
|
@ -38,6 +39,7 @@ if (
|
||||||
this.spawnEnemy = function() {
|
this.spawnEnemy = function() {
|
||||||
|
|
||||||
var enemyType = Math.floor((Math.random() * 5) + 1);
|
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 y = Math.floor((Math.random() * 10) + 2);
|
||||||
|
|
||||||
|
@ -45,7 +47,12 @@ if (
|
||||||
|
|
||||||
apiBox.materials = [this.boxMaterial];
|
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;
|
box.instance.visible = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue