Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 75 bytes modified

beta.r3js.org
-=yb4f310 2018-03-24 15:48:47 +01:00
parent e5e8ec9c54
commit a7939f8e07
1 changed files with 28 additions and 28 deletions

View File

@ -1245,13 +1245,13 @@ GameLib.CustomCode.prototype.powerup = function(gameObject) {
if (gameObject.type === GameLib.CustomCode.POWERUP_SPEED) { if (gameObject.type === GameLib.CustomCode.POWERUP_SPEED) {
this.speed -= GameLib.CustomCode.SPEED_GRAIN; this.speed -= GameLib.CustomCode.POWERUP_SPEED_GRAIN;
if (this.speed < GameLib.CustomCode.MAX_SPEED) { if (this.speed < GameLib.CustomCode.MAX_SPEED) {
this.speed = GameLib.CustomCode.MAX_SPEED; this.speed = GameLib.CustomCode.MAX_SPEED;
} }
this.animation.translationSpeed += GameLib.CustomCode.ANIMATION_SPEED_GRAIN; this.animation.translationSpeed += GameLib.CustomCode.POWERUP_ANIMATION_SPEED_GRAIN;
if (this.animation.translationSpeed > GameLib.CustomCode.MAX_ANIMATION_SPEED) { if (this.animation.translationSpeed > GameLib.CustomCode.MAX_ANIMATION_SPEED) {
this.animation.translationSpeed = GameLib.CustomCode.MAX_ANIMATION_SPEED; this.animation.translationSpeed = GameLib.CustomCode.MAX_ANIMATION_SPEED;
@ -1261,13 +1261,13 @@ GameLib.CustomCode.prototype.powerup = function(gameObject) {
if (gameObject.type === GameLib.CustomCode.POWERUP_SLOW) { if (gameObject.type === GameLib.CustomCode.POWERUP_SLOW) {
this.speed += GameLib.CustomCode.SPEED_GRAIN; this.speed += GameLib.CustomCode.POWERUP_SPEED_GRAIN;
if (this.speed > GameLib.CustomCode.MIN_SPEED) { if (this.speed > GameLib.CustomCode.MIN_SPEED) {
this.speed = GameLib.CustomCode.MIN_SPEED; this.speed = GameLib.CustomCode.MIN_SPEED;
} }
this.animation.translationSpeed -= GameLib.CustomCode.ANIMATION_SPEED_GRAIN; this.animation.translationSpeed -= GameLib.CustomCode.POWERUP_ANIMATION_SPEED_GRAIN;
if (this.animation.translationSpeed < GameLib.CustomCode.MIN_ANIMATION_SPEED) { if (this.animation.translationSpeed < GameLib.CustomCode.MIN_ANIMATION_SPEED) {
this.animation.translationSpeed = GameLib.CustomCode.MIN_ANIMATION_SPEED; this.animation.translationSpeed = GameLib.CustomCode.MIN_ANIMATION_SPEED;