Added map and fixed other bugs
This commit is contained in:
@@ -8,12 +8,17 @@ public class PlayerFacade : NetworkBehaviour
|
||||
[SerializeField] private PlayerMovement playerMovement;
|
||||
[SerializeField] private PlayerHealth playerHealth;
|
||||
[SerializeField] private PlayerShoot playerShoot;
|
||||
[SerializeField] private PlayerShield playerShield;
|
||||
[SerializeField] private PlayerUIController playerUIController;
|
||||
|
||||
public PlayerHealth PlayerHealth => playerHealth;
|
||||
|
||||
public override void OnNetworkSpawn()
|
||||
{
|
||||
// Клон (GhostPlayer) — серверный объект. На хосте он считается IsOwner,
|
||||
// из-за чего перехватывал HUD игрока. Игроковую логику на клоне не запускаем.
|
||||
if(GetComponent<GhostPlayer>() != null) return;
|
||||
|
||||
if(IsOwner)
|
||||
{
|
||||
StartCoroutine(InitPlayerUIController());
|
||||
@@ -27,6 +32,9 @@ public class PlayerFacade : NetworkBehaviour
|
||||
{
|
||||
playerShoot.Init();
|
||||
}
|
||||
|
||||
if (playerShield != null)
|
||||
playerShield.InitInput();
|
||||
}
|
||||
|
||||
if(playerHealth != null)
|
||||
|
||||
Reference in New Issue
Block a user