Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 132 bytes modified
parent
0853f41506
commit
c995e3a9c1
|
@ -572,6 +572,10 @@ GameLib.CustomCode.prototype.createGameObject = function(
|
||||||
|
|
||||||
GameLib.CustomCode.prototype.createPowerup = function(delta) {
|
GameLib.CustomCode.prototype.createPowerup = function(delta) {
|
||||||
|
|
||||||
|
if (this.state.exploding) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.powerupTime += delta;
|
this.powerupTime += delta;
|
||||||
|
|
||||||
if (this.powerupTime > this.nextPowerupTime) {
|
if (this.powerupTime > this.nextPowerupTime) {
|
||||||
|
@ -590,6 +594,10 @@ GameLib.CustomCode.prototype.createPowerup = function(delta) {
|
||||||
|
|
||||||
GameLib.CustomCode.prototype.createFood = function(delta) {
|
GameLib.CustomCode.prototype.createFood = function(delta) {
|
||||||
|
|
||||||
|
if (this.state.exploding) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.foodTime += delta;
|
this.foodTime += delta;
|
||||||
|
|
||||||
if (this.foodTime > this.foodSpeed) {
|
if (this.foodTime > this.foodSpeed) {
|
||||||
|
@ -944,6 +952,10 @@ GameLib.CustomCode.prototype.createCorner = function(body, temp) {
|
||||||
*/
|
*/
|
||||||
GameLib.CustomCode.prototype.advanceSnake = function(delta) {
|
GameLib.CustomCode.prototype.advanceSnake = function(delta) {
|
||||||
|
|
||||||
|
if (this.state.exploding) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.advanceTime += delta;
|
this.advanceTime += delta;
|
||||||
|
|
||||||
if (this.advanceTime > this.speed) {
|
if (this.advanceTime > this.speed) {
|
||||||
|
|
Loading…
Reference in New Issue