Нужно заставить мяч отскакивать от лопастей - PullRequest
0 голосов
/ 23 июня 2019

Нужен мяч, чтобы отскочить от весла и не добавлять счет к comp / plr, когда он ударяет

        If gameBall.Bounds.IntersectsWith(paddlePlayer.Bounds) Then
            gameBall.Location = New Point(paddlePlayer.Location.X - gameBall.Size.Width, gameBall.Location.Y)
            xVel = -xVel
        End If
        ' Check for computer paddle.
        If gameBall.Bounds.IntersectsWith(paddleComputer.Bounds) Then
            gameBall.Location = New Point(paddleComputer.Location.X + paddleComputer.Size.Width + 1, gameBall.Location.Y)
            xVel = -xVel
        End If

This currently dosent work
My Full Current Code: https://pastebin.com/75iCdEYr
...