34 lines
496 B
JavaScript
34 lines
496 B
JavaScript
if (!this.entityLoaded) {
|
|
return;
|
|
}
|
|
|
|
if (!this.initialized) {
|
|
|
|
this.state = this.entityLoaded.state;
|
|
|
|
this.initialized = true;
|
|
}
|
|
|
|
if (this.state.exploding) {
|
|
|
|
this.waitReload(data.delta);
|
|
|
|
/**
|
|
* Wait until finished exploding
|
|
*/
|
|
return;
|
|
}
|
|
|
|
if (this.state.getReady || this.state.gameOver || this.state.paused) {
|
|
return;
|
|
}
|
|
|
|
this.advanceSpeedTimer(data.delta);
|
|
|
|
this.advanceSnake(data.delta);
|
|
|
|
this.createFood(data.delta);
|
|
|
|
this.createPowerup(data.delta);
|
|
|
|
//@ sourceURL=beforeRender.js
|