需要使球从桨上弹起

时间:2019-06-23 08:34:30

标签: vb.net bounce pong

需要球弹跳桨并且击中球时不向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

0 个答案:

没有答案