Remove auto rotate in the normal script and add F as a shoot key along with left click

This commit is contained in:
Lncvrt committed 2025-10-08 11:30:32 -07:00
1 parent 5f430f79b1
commit 4372f7862f
2 files changed
+2 -5

No files matched your search

+1 -4
View File
@@ -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;