fix: game: 2d work

This commit is contained in:
2024-04-10 15:40:54 +00:00
parent 8b9c4d7c1c
commit 0b7e72d8e2
10 changed files with 41 additions and 39 deletions

View File

@ -2,6 +2,7 @@ import { AExchangeable } from "../../AExchangable.js";
import { PongGame } from "./PongGame.js";
import { renderCube} from "../../../3D/cube.js"
import { Position } from "./Position.js";
import { Point } from "./Point.js";
export class PongBall extends AExchangeable
{
@ -13,7 +14,7 @@ export class PongBall extends AExchangeable
* @param {Number} speed
* @param {Number} size
*/
constructor(game, size, position = new Position(), angle, speed)
constructor(game, size, position = new Position(new Point(game.config.CENTER_X, game.config.CENTER_Y), 0), angle, speed)
{
super();