WIP multiBalls (need refactoring)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
|
||||
import * as c from "./constants.js";
|
||||
import * as en from "../shared_js/enums.js"
|
||||
import { gc, clientInfo } from "./global.js";
|
||||
|
||||
let actual_time: number = Date.now();
|
||||
@@ -23,6 +24,11 @@ function gameLoop()
|
||||
|
||||
// client prediction
|
||||
gc.ball.moveAndBounce(delta_time, [gc.wallTop, gc.wallBottom, gc.playerLeft, gc.playerRight]);
|
||||
if (c.optionsPLACEHOLDER & en.MatchOptions.multiBalls)
|
||||
{ // ALTERNATIVE POSSIBLE, Array of balls
|
||||
gc.ball2.moveAndBounce(delta_time, [gc.wallTop, gc.wallBottom, gc.playerLeft, gc.playerRight]);
|
||||
gc.ball3.moveAndBounce(delta_time, [gc.wallTop, gc.wallBottom, gc.playerLeft, gc.playerRight]);
|
||||
}
|
||||
}
|
||||
|
||||
function opponentInterpolation(delta: number)
|
||||
|
||||
Reference in New Issue
Block a user