Characters

This commit is contained in:
2025-10-05 18:21:16 +02:00
parent b52b3aa830
commit 174a399ee7
77 changed files with 14406 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
using UnityEngine;
namespace MegaKoop.Game.Networking
{
public class NetworkCharacterInputProxy : MonoBehaviour, ICharacterInputSource
{
public Vector2 MoveInput { get; private set; }
public bool JumpPressed { get; private set; }
private bool jumpConsumed;
public void SetInput(Vector2 move, bool jump)
{
MoveInput = move;
if (jump)
{
JumpPressed = true;
jumpConsumed = false;
}
}
private void LateUpdate()
{
if (JumpPressed && !jumpConsumed)
{
jumpConsumed = true;
}
else if (jumpConsumed)
{
JumpPressed = false;
}
}
}
}