2018-03-12 14:24:45 +01:00
|
|
|
if (!this.entityLoaded) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!this.initialized) {
|
2018-03-23 08:43:06 +01:00
|
|
|
|
|
|
|
this.state = this.entityLoaded.state;
|
|
|
|
|
2018-03-12 14:24:45 +01:00
|
|
|
this.initialized = true;
|
|
|
|
}
|
|
|
|
|
2018-03-23 08:43:06 +01:00
|
|
|
if (this.state.exploding) {
|
2018-03-23 08:46:23 +01:00
|
|
|
|
|
|
|
this.waitReload(data.delta);
|
2018-03-23 08:43:06 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Wait until finished exploding
|
|
|
|
*/
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2018-03-24 14:31:52 +01:00
|
|
|
if (this.state.getReady || this.state.gameOver) {
|
2018-03-23 14:45:39 +01:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2018-03-24 15:41:34 +01:00
|
|
|
this.advanceSpeedTimer(data.delta);
|
|
|
|
|
2018-03-12 14:24:45 +01:00
|
|
|
this.advanceSnake(data.delta);
|
|
|
|
|
2018-03-20 15:02:02 +01:00
|
|
|
this.createFood(data.delta);
|
|
|
|
|
2018-03-21 14:15:48 +01:00
|
|
|
this.createPowerup(data.delta);
|
|
|
|
|
2018-03-12 14:24:45 +01:00
|
|
|
//@ sourceURL=beforeRender.js
|