added endscreen
This commit is contained in:
1 parent
a33eb50ca0
commit
2b01c50795
15 files changed
+989
-88
No files matched your search
@@ -10,6 +10,5 @@ namespace Code.Gameplay.Character.Core
|
||||
public Vector3 CameraPlanarDirection;
|
||||
public bool JumpPressed;
|
||||
public bool SprintPressed;
|
||||
public bool SlidePressed;
|
||||
}
|
||||
}
|
||||
@@ -18,25 +18,12 @@ namespace Code.Gameplay.Character.Core
|
||||
private IInputService _inputService;
|
||||
private CameraController _cameraController;
|
||||
|
||||
public CustomCharacterController CustomCharacterController => customCharacterController;
|
||||
public HealthSystem HealthSystem => healthSystem;
|
||||
public WeaponInventory WeaponInventory => weaponInventory;
|
||||
public Transform GetFollowTransform() => cameraFollowPoint;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_inputService = FindFirstObjectByType<DIContainer>()?.Resolve<IInputService>();
|
||||
_cameraController = FindFirstObjectByType<CameraController>();
|
||||
|
||||
if (_inputService == null)
|
||||
{
|
||||
Debug.LogError("IInputService not found!");
|
||||
}
|
||||
|
||||
if (_cameraController == null)
|
||||
{
|
||||
Debug.LogError("CameraController not found!");
|
||||
}
|
||||
|
||||
if (healthSystem != null)
|
||||
{
|
||||
@@ -55,15 +42,6 @@ namespace Code.Gameplay.Character.Core
|
||||
Debug.Log("Character died!");
|
||||
}
|
||||
|
||||
public void Teleport(Vector3 position, Quaternion rotation)
|
||||
{
|
||||
if (customCharacterController != null)
|
||||
{
|
||||
customCharacterController.SetPosition(position);
|
||||
customCharacterController.SetRotation(rotation);
|
||||
}
|
||||
}
|
||||
|
||||
private void HandleCharacterInput()
|
||||
{
|
||||
if (_inputService == null || _cameraController == null || customCharacterController == null)
|
||||
|
||||
@@ -24,10 +24,7 @@ namespace Code.Gameplay.Character.Controller
|
||||
private float _jumpCooldownTimer;
|
||||
private float JumpCooldownDuration => jumpCooldownDuration;
|
||||
public bool CanJump => _jumpCooldownTimer <= 0f;
|
||||
|
||||
public void SetPosition(Vector3 position) => motor.SetPosition(position);
|
||||
public void SetRotation(Quaternion rotation) => motor.SetRotation(rotation);
|
||||
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_inputHandler = new CharacterInputHandler(
|
||||
|
||||
Reference in new issue
Block a user