Remove dum shit

This commit is contained in:
2025-06-11 14:20:35 -07:00
parent eff9f38068
commit 683988fc97

View File

@@ -182,7 +182,7 @@ public class GamePlayer : MonoBehaviour
{ {
doMoveRight = true; 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 && !Application.isMobilePlatform || (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 || Mouse.current.leftButton.isPressed || (Gamepad.current != null && Gamepad.current.buttonSouth.isPressed))
{ {
doJump = true; doJump = true;
} }
@@ -192,36 +192,6 @@ public class GamePlayer : MonoBehaviour
} }
} }
if (Application.isMobilePlatform) if (Application.isMobilePlatform)
{
if (!Application.isMobilePlatform)
{
if (Mouse.current.leftButton.isPressed)
{
UnityEngine.Vector3 touchPosition = Camera.main.ScreenToWorldPoint(Pointer.current.position.ReadValue());
touchPosition.z = 0f;
if (leftArrow.GetComponent<SpriteRenderer>().bounds.Contains(touchPosition))
{
doMoveLeft = true;
}
if (rightArrow.GetComponent<SpriteRenderer>().bounds.Contains(touchPosition))
{
doMoveRight = true;
}
if (jumpArrow.GetComponent<SpriteRenderer>().bounds.Contains(touchPosition))
{
doJump = true;
}
if (restartButton.GetComponent<SpriteRenderer>().bounds.Contains(touchPosition))
{
doRestart = true;
}
if (backButton.GetComponent<SpriteRenderer>().bounds.Contains(touchPosition))
{
doBack = true;
}
}
}
else
{ {
var touches = UnityEngine.InputSystem.EnhancedTouch.Touch.activeTouches; var touches = UnityEngine.InputSystem.EnhancedTouch.Touch.activeTouches;
for (int i = 0; i < touches.Count; i++) for (int i = 0; i < touches.Count; i++)
@@ -251,7 +221,6 @@ public class GamePlayer : MonoBehaviour
} }
} }
} }
}
if (doMoveLeft && !doMoveRight) if (doMoveLeft && !doMoveRight)
{ {
lastMoveTime = Time.time; lastMoveTime = Time.time;