Update: CC - Before Render - Moorcow (9l6o7974qx.js) 4 bytes modified
parent
cc9486e355
commit
a2eddc4096
|
@ -22,7 +22,7 @@ if (
|
||||||
this.getNextSpawnTime = function() {
|
this.getNextSpawnTime = function() {
|
||||||
return GameLib.Utils.GetRandomIntInclusive(
|
return GameLib.Utils.GetRandomIntInclusive(
|
||||||
1,
|
1,
|
||||||
2
|
10
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,15 +34,13 @@ if (
|
||||||
|
|
||||||
var enemyType = Math.floor((Math.random() * 5) + 1);
|
var enemyType = Math.floor((Math.random() * 5) + 1);
|
||||||
|
|
||||||
var y = Math.floor((Math.random() * 40) + 2);
|
var y = Math.floor((Math.random() * 10) + 2);
|
||||||
|
|
||||||
var apiBox = new GameLib.D3.API.Mesh();
|
var apiBox = new GameLib.D3.API.Mesh();
|
||||||
|
|
||||||
apiBox.materials = [this.boxMaterial];
|
apiBox.materials = [this.boxMaterial];
|
||||||
|
|
||||||
var box = GameLib.EntityManager.Instance.findComponentById('3upawmhh8j').clone();
|
var box = GameLib.EntityManager.Instance.findComponentById('3upawmhh8j').clone();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var velocity = null;
|
var velocity = null;
|
||||||
|
|
||||||
|
@ -53,30 +51,30 @@ if (
|
||||||
};
|
};
|
||||||
|
|
||||||
if (enemyType === 1) {
|
if (enemyType === 1) {
|
||||||
position.x = -500;
|
position.x = -100;
|
||||||
velocity = {x:1,y:0,z:0};
|
velocity = {x:1,y:0,z:0};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enemyType === 2) {
|
if (enemyType === 2) {
|
||||||
position.x = 500;
|
position.x = 100;
|
||||||
velocity = {x:-1,y:0,z:0};
|
velocity = {x:-1,y:0,z:0};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enemyType === 3) {
|
if (enemyType === 3) {
|
||||||
position.x = -500;
|
position.x = -100;
|
||||||
position.z = -500;
|
position.z = -100;
|
||||||
velocity = {x:1,y:0,z:1};
|
velocity = {x:1,y:0,z:1};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enemyType === 4) {
|
if (enemyType === 4) {
|
||||||
position.x = 500;
|
position.x = 100;
|
||||||
position.z = -500;
|
position.z = -100;
|
||||||
velocity = {x:-1,y:0,z:1};
|
velocity = {x:-1,y:0,z:1};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enemyType === 5) {
|
if (enemyType === 5) {
|
||||||
position.x = 0;
|
position.x = 0;
|
||||||
position.z = -500;
|
position.z = -100;
|
||||||
velocity = {x:0,y:0,z:1};
|
velocity = {x:0,y:0,z:1};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +86,7 @@ if (
|
||||||
|
|
||||||
enemy.velocity = velocity;
|
enemy.velocity = velocity;
|
||||||
enemy.lifeTime = 0;
|
enemy.lifeTime = 0;
|
||||||
enemy.life = 50;
|
enemy.life = 5;
|
||||||
|
|
||||||
this.enemies.push(enemy);
|
this.enemies.push(enemy);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue