Change version, fix wrong ball rotation, use circle sprite

This commit is contained in:
sam-astro 2022-05-27 19:35:07 -04:00
parent d24044a242
commit 1188412769
4 changed files with 4 additions and 4 deletions

View File

@ -5,7 +5,7 @@
//bool DEVELOPER_MESSAGES = true;
#define DEVELOPER_MESSAGES false
#define EXAMPLE_PROJECT false
#define NAMEVERSION "ZSharp v2.1.0-alpha"
#define NAMEVERSION "ZSharp v2.1.1-alpha"
#if defined(__unix__)
#define UNIX true

View File

@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "Z-Sharp"
#define MyAppVersion "2.1.0-alpha"
#define MyAppVersion "2.1.1-alpha"
#define MyAppPublisher "AstroSam"
#define MyAppURL "https://github.com/sam-astro/Z-Sharp"
#define MyAppExeName "ZSharp.exe"

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 B

View File

@ -41,7 +41,7 @@ func Start()
Vec2 rPaddlePosition = NVec2(rOffset, yPosPaddle)
global Vec2 rPaddleTargetPosition = NVec2(rOffset, yPosPaddle)
global Sprite ballSpr = ZS.Graphics.Sprite("./square.png", ballPos, ballScale, 0)
global Sprite ballSpr = ZS.Graphics.Sprite("./ball.png", ballPos, ballScale, 0)
global Sprite lPaddle = ZS.Graphics.Sprite("./square.png", lPaddlePosition, paddleScale, 0)
global Sprite rPaddle = ZS.Graphics.Sprite("./square.png", rPaddlePosition, paddleScale, 0)
@ -239,7 +239,7 @@ func HandleBallBounce()
difference -= ballY
float paddleHeight = rPaddle.scale.y
float normalizedRelativeIntersectionY = difference / (paddleHeight / 2)
float bounceAngle = normalizedRelativeIntersectionY * 0.523599
float bounceAngle = normalizedRelativeIntersectionY * -0.523599
float ballVx = ballSpeed
ballVx *= Cos(bounceAngle)
ballVx *= -1