Update: CC - SnailRunner - Entity Loaded (78gnds8jrj.js) 127 bytes modified
parent
e6bdbea81e
commit
f83b17fe0e
|
@ -151,6 +151,16 @@ GameLib.CustomCode.prototype.adjustSpeed = function(delta) {
|
||||||
|
|
||||||
if (this.speedUp) {
|
if (this.speedUp) {
|
||||||
this.speed += delta;
|
this.speed += delta;
|
||||||
|
} else {
|
||||||
|
this.speed -= delta;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.speed < 0) {
|
||||||
|
this.speed = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.speed > 50) {
|
||||||
|
this.speed = 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
}.bind(this);
|
}.bind(this);
|
||||||
|
|
Loading…
Reference in New Issue