Initial Commit

This commit is contained in:
2026-03-16 14:38:46 +02:00
commit b8f7327a21
2327 changed files with 253610 additions and 0 deletions
@@ -0,0 +1,24 @@
using UnityEngine;
namespace Zenject.SpaceFighter
{
public class PlayerInputHandler : ITickable
{
readonly PlayerInputState _inputState;
public PlayerInputHandler(PlayerInputState inputState)
{
_inputState = inputState;
}
public void Tick()
{
_inputState.IsMovingLeft = Input.GetKey(KeyCode.LeftArrow) || Input.GetKey(KeyCode.A);
_inputState.IsMovingRight = Input.GetKey(KeyCode.RightArrow) || Input.GetKey(KeyCode.D);
_inputState.IsMovingUp = Input.GetKey(KeyCode.UpArrow) || Input.GetKey(KeyCode.W);
_inputState.IsMovingDown = Input.GetKey(KeyCode.DownArrow) || Input.GetKey(KeyCode.S);
_inputState.IsFiring = Input.GetKey(KeyCode.Space) || Input.GetMouseButton(0);
}
}
}