чё то чё то есть
This commit is contained in:
1 parent
f632508497
commit
f12b4aef0d
14 files changed
+571
-97
No files matched your search
@@ -1,24 +1,35 @@
|
||||
using _Project.Scripts.PlayerUtils;
|
||||
using _Project.Scripts.Utilities;
|
||||
using UnityEngine;
|
||||
using _Project.Scripts.Utilities;
|
||||
|
||||
namespace _Project.Scripts
|
||||
namespace _Project.Scripts.PlayerUtils
|
||||
{
|
||||
public class Player : MonoSingleton<Player>
|
||||
{
|
||||
private PlayerMovement movement;
|
||||
public PlayerControls controls { get; set; }
|
||||
public PlayerControls Controls { get; private set; }
|
||||
|
||||
public PlayerMovement Movement { get; private set; }
|
||||
public PlayerCamera CameraController { get; private set; }
|
||||
public PlayerCombat Combat { get; private set; }
|
||||
public PlayerSound Sound { get; private set; }
|
||||
public PlayerUI UI { get; private set; } // Новый модуль
|
||||
|
||||
void Awake()
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
|
||||
Controls = new PlayerControls();
|
||||
|
||||
movement = GetComponent<PlayerMovement>();
|
||||
controls = GetComponent<PlayerControls>();
|
||||
Movement = GetComponent<PlayerMovement>();
|
||||
CameraController = GetComponent<PlayerCamera>();
|
||||
Combat = GetComponent<PlayerCombat>();
|
||||
Sound = GetComponent<PlayerSound>();
|
||||
UI = GetComponent<PlayerUI>(); // Инициализация
|
||||
|
||||
Cursor.lockState = CursorLockMode.Locked;
|
||||
Cursor.visible = false;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
private void OnEnable() => Controls.Player.Enable();
|
||||
private void OnDisable() => Controls.Player.Disable();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user