From 8a42932cf27c4dcaa5ea9f9208c2eb1626296f62 Mon Sep 17 00:00:00 2001 From: RochesterX Date: Thu, 9 Jan 2025 11:53:58 -0500 Subject: [PATCH] Made the ball speed up (second computer test) --- .vscode/extensions.json | 5 +++ .vscode/launch.json | 10 +++++ .vscode/settings.json | 60 +++++++++++++++++++++++++++ Assets/Games/Pong/Pong.unity | 2 +- Assets/Games/Pong/PongBallBehavior.cs | 2 +- 5 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 .vscode/extensions.json create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..ddb6ff8 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "visualstudiotoolsforunity.vstuc" + ] +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..da60e25 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,10 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Attach to Unity", + "type": "vstuc", + "request": "attach" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..f1437c8 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,60 @@ +{ + "files.exclude": { + "**/.DS_Store": true, + "**/.git": true, + "**/.vs": true, + "**/.gitmodules": true, + "**/.vsconfig": true, + "**/*.booproj": true, + "**/*.pidb": true, + "**/*.suo": true, + "**/*.user": true, + "**/*.userprefs": true, + "**/*.unityproj": true, + "**/*.dll": true, + "**/*.exe": true, + "**/*.pdf": true, + "**/*.mid": true, + "**/*.midi": true, + "**/*.wav": true, + "**/*.gif": true, + "**/*.ico": true, + "**/*.jpg": true, + "**/*.jpeg": true, + "**/*.png": true, + "**/*.psd": true, + "**/*.tga": true, + "**/*.tif": true, + "**/*.tiff": true, + "**/*.3ds": true, + "**/*.3DS": true, + "**/*.fbx": true, + "**/*.FBX": true, + "**/*.lxo": true, + "**/*.LXO": true, + "**/*.ma": true, + "**/*.MA": true, + "**/*.obj": true, + "**/*.OBJ": true, + "**/*.asset": true, + "**/*.cubemap": true, + "**/*.flare": true, + "**/*.mat": true, + "**/*.meta": true, + "**/*.prefab": true, + "**/*.unity": true, + "build/": true, + "Build/": true, + "Library/": true, + "library/": true, + "obj/": true, + "Obj/": true, + "Logs/": true, + "logs/": true, + "ProjectSettings/": true, + "UserSettings/": true, + "temp/": true, + "Temp/": true + }, + "dotnet.defaultSolution": "Sophomore-Project.sln" +} \ No newline at end of file diff --git a/Assets/Games/Pong/Pong.unity b/Assets/Games/Pong/Pong.unity index 262c691..3fa8f34 100644 --- a/Assets/Games/Pong/Pong.unity +++ b/Assets/Games/Pong/Pong.unity @@ -2254,7 +2254,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: speed: 400 - speedIncrement: 0.1 + speedIncrement: 20 resetDelay: 1 --- !u!1660057539 &9223372036854775807 SceneRoots: diff --git a/Assets/Games/Pong/PongBallBehavior.cs b/Assets/Games/Pong/PongBallBehavior.cs index d3ff1ee..97ccd6b 100644 --- a/Assets/Games/Pong/PongBallBehavior.cs +++ b/Assets/Games/Pong/PongBallBehavior.cs @@ -18,7 +18,7 @@ public class PongBallBehavior : MonoBehaviour public void IncreaseSpeed() { - rb.AddForce(rb.linearVelocity.normalized * speedIncrement, ForceMode2D.Impulse); + rb.AddForce(rb.linearVelocity.normalized * speedIncrement, ForceMode2D.Force); } private IEnumerator Reset()