BattleSys Strated

This commit is contained in:
ThomasCharester committed 2026-10-20 18:04:44 +03:00
1 parent ee8bd4799a
commit 655a4a1617
7677 files changed
+357092 -1163592

No files matched your search

@@ -1,4 +1,5 @@
using Code.Game.Gameplay.Player;
using Code.Infrastructure.Camera;
using Code.Infrastructure.Input;
using Reflex.Attributes;
using UnityEngine;
@@ -13,10 +14,13 @@ namespace Code.Game.Cleaning.Player
private IInputService _inputService;
private Vector2 _movementInput;
private Transform _cameraTransform;
[Inject]
private void Construct(IInputService inputService)
private void Construct(IInputService inputService, CameraStateMachine cameraStateMachine)
{
_cameraTransform = cameraStateMachine.Camera.transform;
_inputService = inputService;
_inputService.BindActionPerformed((int)ActionMappings.OpenMovement, (int)OpenMovementActions.Movement,
@@ -30,10 +34,13 @@ namespace Code.Game.Cleaning.Player
private void Update()
{
if (!_cameraTransform) return;
var inputs = new PlayerCharacterInputs()
{
MoveAxisForward = _movementInput.y,
MoveAxisRight = _movementInput.x
MoveAxisRight = _movementInput.x,
CameraRotation = _cameraTransform.rotation
};
playerMovementController.SetInputs(ref inputs);