From d71edf7806e0f4dfbaf4e68c36fca8afcc7371af Mon Sep 17 00:00:00 2001 From: RochesterX Date: Thu, 9 Jan 2025 12:23:19 -0500 Subject: [PATCH] Made the Pong score reset --- Assets/Games/Pong/PongBallBehavior.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/Games/Pong/PongBallBehavior.cs b/Assets/Games/Pong/PongBallBehavior.cs index 97ccd6b..9d8f261 100644 --- a/Assets/Games/Pong/PongBallBehavior.cs +++ b/Assets/Games/Pong/PongBallBehavior.cs @@ -3,7 +3,7 @@ using UnityEngine; public class PongBallBehavior : MonoBehaviour { - public static Vector2 score; + public static Vector2 score; // Don't ask why I made the score a Vector, I just felt like it public float speed = 400f; public float speedIncrement = 0.1f; @@ -12,6 +12,7 @@ public class PongBallBehavior : MonoBehaviour private void Start() { + score = Vector2.zero; rb = GetComponent(); StartCoroutine(Reset()); }