forked from MarseyWorld/MarseyWorld
fix stalker award overflow
parent
7c1c3f11ae
commit
8c2acaa17e
|
@ -100,6 +100,7 @@ function draw() {
|
||||||
let ghost = ghosts[0];
|
let ghost = ghosts[0];
|
||||||
let prevghost = ghosts[0];
|
let prevghost = ghosts[0];
|
||||||
ghost.x = ghost.X += (mouse.x - ghost.X) * speed;
|
ghost.x = ghost.X += (mouse.x - ghost.X) * speed;
|
||||||
|
ghost.x = Math.min(ghost.x, screen_width * 0.7);
|
||||||
ghost.y = ghost.Y += (mouse.y - ghost.Y) * speed;
|
ghost.y = ghost.Y += (mouse.y - ghost.Y) * speed;
|
||||||
for (let i = count - 1; i > 0; --i) {
|
for (let i = count - 1; i > 0; --i) {
|
||||||
ghost = ghosts[i];
|
ghost = ghosts[i];
|
||||||
|
|
Loading…
Reference in New Issue