From 1188412769fc3c98522d030db9e4dc7c6534114e Mon Sep 17 00:00:00 2001 From: sam-astro <77079540+sam-astro@users.noreply.github.com> Date: Fri, 27 May 2022 19:35:07 -0400 Subject: [PATCH] Change version, fix wrong ball rotation, use circle sprite --- ZSharp/Main.cpp | 2 +- ZSharp/ZSharpInstallerMakerInnoSetup.iss | 2 +- examples/Pong-Example-Project/ball.png | Bin 0 -> 403 bytes examples/Pong-Example-Project/script.zs | 4 ++-- 4 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 examples/Pong-Example-Project/ball.png diff --git a/ZSharp/Main.cpp b/ZSharp/Main.cpp index 8d39ba8..37a3063 100644 --- a/ZSharp/Main.cpp +++ b/ZSharp/Main.cpp @@ -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 diff --git a/ZSharp/ZSharpInstallerMakerInnoSetup.iss b/ZSharp/ZSharpInstallerMakerInnoSetup.iss index 729149a..f3befbb 100644 --- a/ZSharp/ZSharpInstallerMakerInnoSetup.iss +++ b/ZSharp/ZSharpInstallerMakerInnoSetup.iss @@ -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" diff --git a/examples/Pong-Example-Project/ball.png b/examples/Pong-Example-Project/ball.png new file mode 100644 index 0000000000000000000000000000000000000000..54ee51d56792df90b004cbfc6bc49d632b47efee GIT binary patch literal 403 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=jKx9jP7LeL$-D%zeLYJ`>`xuP>?g8QKW&7q1WZ_U+st5 z4NMmp7c68bVaU*6kY$kKa$s+00|`C+%TOW!5xXbq#@^KC-!`GKqQSpCu(6_1-9@0W zqN#n!Jhiz>3t!KevuQWWJQ3Xkhc9jIeyf)FqVT88d!=QjK2Iv9Zdj7)_E9Y{^KuAZ v6w8|2b3)q+F9~fcy(YA+@)zIwx1Zzx=S_)7)-5XshBAYvtDnm{r-UW|^7W@x literal 0 HcmV?d00001 diff --git a/examples/Pong-Example-Project/script.zs b/examples/Pong-Example-Project/script.zs index e83f93e..932b113 100644 --- a/examples/Pong-Example-Project/script.zs +++ b/examples/Pong-Example-Project/script.zs @@ -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