BattleSys Strated
This commit is contained in:
1 parent
ee8bd4799a
commit
655a4a1617
7677 files changed
+357092
-1163592
No files matched your search
@@ -1,17 +1,15 @@
|
||||
using System;
|
||||
using Code.Infrastructure.Camera;
|
||||
using Code.Infrastructure.Camera.CameraStates;
|
||||
using Code.Infrastructure.Generators;
|
||||
using Code.Infrastructure.Input;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using R3;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace Code.Game.Gameplay.Player
|
||||
{
|
||||
[State(typeof(CameraMode),typeof(CameraStateMachineContext), ManualInherit = true)]
|
||||
public partial class CleanerCameraState : BaseCameraState
|
||||
public partial class OpenMovementCameraState : BaseCameraState
|
||||
{
|
||||
public void SetTarget(Transform target)
|
||||
{
|
||||
@@ -27,10 +25,8 @@ namespace Code.Game.Gameplay.Player
|
||||
|
||||
private float _sensitivityX = 0.1f;
|
||||
private float _sensitivityY = 0.1f;
|
||||
private float _slideStupidity = 1f;
|
||||
private bool _isSliding;
|
||||
|
||||
public CleanerCameraState(CameraStateMachineContext context) : base(context)
|
||||
public OpenMovementCameraState(CameraStateMachineContext context) : base(context)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -67,12 +63,6 @@ namespace Code.Game.Gameplay.Player
|
||||
|
||||
var mouseDeltaX = _mouseDelta.x * _sensitivityX;
|
||||
var mouseDeltaY = _mouseDelta.y * _sensitivityY;
|
||||
|
||||
if (_isSliding)
|
||||
{
|
||||
mouseDeltaX = Mathf.Clamp(mouseDeltaX, -_slideStupidity, _slideStupidity);
|
||||
mouseDeltaY = Mathf.Clamp(mouseDeltaY, -_slideStupidity, _slideStupidity);
|
||||
}
|
||||
|
||||
_rotation.x += mouseDeltaX;
|
||||
_rotation.y -= mouseDeltaY;
|
||||
|
||||
Reference in new issue
Block a user