Added base Round Logic and base map with characters

This commit is contained in:
2026-06-19 17:55:30 +03:00
parent 86d59db726
commit f5c79c7241
117 changed files with 14744 additions and 128 deletions
@@ -9,9 +9,25 @@ public class PlayerShoot : NetworkBehaviour
[SerializeField] GameObject hitEffectPrefab;
private PlayerHealth playerHealth;
public override void OnNetworkSpawn()
{
if (IsOwner)
{
playerHealth = GetComponent<PlayerHealth>();
if (playerHealth == null)
{
Debug.LogError("PlayerHealth component not found on player");
}
}
}
void Update()
{
if (!IsOwner) return;
if(playerHealth == null || playerHealth.isDead.Value) return;
if (Input.GetMouseButtonDown(0))
{
@@ -44,6 +60,6 @@ public class PlayerShoot : NetworkBehaviour
private void SpawnHitEffectClientRpc(Vector3 _hitPosition)
{
Debug.Log($"Spawning hit effect at {_hitPosition}");
NetworkBehaviour.Instantiate(hitEffectPrefab, _hitPosition, Quaternion.identity);
Instantiate(hitEffectPrefab, _hitPosition, Quaternion.identity);
}
}