From 8454afe508543723f74bedf6da8035703d27775b Mon Sep 17 00:00:00 2001 From: Santi Date: Fri, 28 Jun 2024 13:23:30 +0100 Subject: [PATCH] Catch: Added bombs to the game, lowered time, fixed double point error. Movement: Fixed player moving faster when moving diagonally --- Assets/Scripts/Movement.cs | 11 +++++++++++ ProjectSettings/TagManager.asset | 1 + 2 files changed, 12 insertions(+) diff --git a/Assets/Scripts/Movement.cs b/Assets/Scripts/Movement.cs index 8256bb1..8caae30 100644 --- a/Assets/Scripts/Movement.cs +++ b/Assets/Scripts/Movement.cs @@ -57,6 +57,17 @@ public class Movement : MonoBehaviour { moveDirection.y = jumpForce; } + //If player is moving diagonally, reduce speed + if (forwards != 0 && right != 0 || forwards != 0 && left != 0 || backwards != 0 && right != 0 || backwards != 0 && left != 0) + { + moveDirection *= 0.7f; + } + else + { + moveDirection *= 1.0f; + + } + } if(hammer) diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index 7b350a4..edc6ed3 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -8,6 +8,7 @@ TagManager: - PickupObject - Mole - Container + - Bomb layers: - Default - TransparentFX