game: online: recoded but collision not work

This commit is contained in:
2024-05-14 03:28:05 +02:00
parent 18bc8a0028
commit 7a0ff15cec
16 changed files with 518 additions and 653 deletions

View File

@ -16,11 +16,12 @@ class Ball:
self.speed: float
self.reset()
self.speed = 0
def reset(self) -> None:
self.size = config.BALL_SIZE
self.position = Position(Point(config.BALL_SPAWN_POS_X + self.size / 2, config.BALL_SPAWN_POS_Y + self.size / 2), time.time())
self.angle = math.pi * 0.3
self.angle = math.pi * 1
self.speed = config.BALL_SPEED_START
def to_dict(self) -> dict: