mirror of
https://github.com/sam-astro/Z-Sharp.git
synced 2025-12-10 15:52:12 +00:00
Change version, fix wrong ball rotation, use circle sprite
This commit is contained in:
parent
d24044a242
commit
1188412769
@ -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
|
||||
|
||||
@ -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"
|
||||
|
||||
BIN
examples/Pong-Example-Project/ball.png
Normal file
BIN
examples/Pong-Example-Project/ball.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 403 B |
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user