diff --git a/Assets/Scripts/GamePlayer.cs b/Assets/Scripts/GamePlayer.cs index 30eedab..5d62c54 100644 --- a/Assets/Scripts/GamePlayer.cs +++ b/Assets/Scripts/GamePlayer.cs @@ -96,7 +96,7 @@ public class GamePlayer : MonoBehaviour { doMoveRight = true; } - if (controllerJump || Keyboard.current.spaceKey.isPressed || Keyboard.current.upArrowKey.isPressed || Keyboard.current.wKey.isPressed || Keyboard.current.downArrowKey.isPressed || Keyboard.current.sKey.isPressed || Keyboard.current.kKey.isPressed || Keyboard.current.iKey.isPressed || Mouse.current.leftButton.isPressed || (Gamepad.current != null && Gamepad.current.buttonSouth.isPressed)) + if (controllerJump || Keyboard.current.spaceKey.isPressed || Keyboard.current.upArrowKey.isPressed || Keyboard.current.wKey.isPressed || Keyboard.current.downArrowKey.isPressed || Keyboard.current.sKey.isPressed || Keyboard.current.kKey.isPressed || Keyboard.current.iKey.isPressed || (Gamepad.current != null && Gamepad.current.buttonSouth.isPressed)) { doJump = true; } @@ -124,13 +124,11 @@ public class GamePlayer : MonoBehaviour { bird.transform.position += new UnityEngine.Vector3(-movespeed, 0f, 0f); ClampPosition(bird); - bird.transform.localScale = new UnityEngine.Vector3(1.35f, 1.35f, 1.35f); } if (doMoveRight && !doMoveLeft) { bird.transform.position += new UnityEngine.Vector3(movespeed, 0f, 0f); ClampPosition(bird); - bird.transform.localScale = new UnityEngine.Vector3(-1.35f, 1.35f, 1.35f); } if (doJump && isGrounded) { @@ -597,7 +595,6 @@ public class GamePlayer : MonoBehaviour void Respawn() { bird.transform.position = new UnityEngine.Vector3(0f, -4.3f, 0f); - bird.transform.localScale = new UnityEngine.Vector3(1.35f, 1.35f, 1.35f); rb.gravityScale = 0f; rb.linearVelocity = UnityEngine.Vector2.zero; score = 0; diff --git a/Assets/Scripts/GunHandler.cs b/Assets/Scripts/GunHandler.cs index 539c0a2..948cb0a 100644 --- a/Assets/Scripts/GunHandler.cs +++ b/Assets/Scripts/GunHandler.cs @@ -51,7 +51,7 @@ public class GunHandler : MonoBehaviour transform.rotation = Quaternion.Euler(0f, 0f, clamped); - if (Keyboard.current.leftShiftKey.wasPressedThisFrame || Keyboard.current.rightShiftKey.wasPressedThisFrame) + if (Keyboard.current.leftShiftKey.wasPressedThisFrame || Keyboard.current.rightShiftKey.wasPressedThisFrame || Keyboard.current.fKey.wasPressedThisFrame || Mouse.current.leftButton.wasPressedThisFrame) { Vector3 offset = new(0.6932073f, 0.352302f, 0f); if (flipped) offset.x = -offset.x;