added alternate game mode "movingWalls"

This commit is contained in:
LuckyLaszlo
2022-12-02 21:01:06 +01:00
parent 93a40f2ad9
commit 59c7ae2a16
13 changed files with 136 additions and 24 deletions

View File

@@ -90,6 +90,11 @@ function gameUpdate(data: ev.EventGameUpdate)
{
console.log("gameUpdate");
if (c.optionsPLACEHOLDER & en.MatchOptions.movingWalls) {
gc.wallTop.pos.y = data.wallTop.y;
gc.wallBottom.pos.y = data.wallBottom.y;
}
data.ballsArr.forEach((ball, i) => {
gc.ballsArr[i].pos.assign(ball.x, ball.y);
gc.ballsArr[i].dir.assign(ball.dirX, ball.dirY);