first commit

This commit is contained in:
2026-05-25 20:45:05 +03:00
commit bd55a73956
59 changed files with 8597 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
using UnityEngine;
public class PlayerInput : MonoBehaviour
{
public Vector3 MoveInput { get; private set; }
public bool JumpPressed { get; private set; }
private void Update()
{
float horizontal = Input.GetAxisRaw("Horizontal");
float vertical = Input.GetAxisRaw("Vertical");
MoveInput = new Vector3(horizontal, 0f, vertical).normalized;
if (Input.GetButtonDown("Jump"))
{
JumpPressed = true;
}
}
public bool ConsumeJump()
{
if (!JumpPressed)
{
return false;
}
JumpPressed = false;
return true;
}
}