Added map and fixed other bugs

This commit is contained in:
2026-07-03 14:36:04 +03:00
parent 94739757be
commit 3d423974eb
161 changed files with 35735 additions and 315 deletions
@@ -11,6 +11,7 @@ public class PlayerShoot : NetworkBehaviour
private PlayerHealth playerHealth;
private WeaponView weaponView;
private PlayerShield playerShield;
private bool isActive = false;
@@ -19,6 +20,7 @@ public class PlayerShoot : NetworkBehaviour
isActive = true;
playerHealth = GetComponent<PlayerHealth>();
playerShield = GetComponent<PlayerShield>();
weaponView = GetComponentInChildren<WeaponView>(true);
}
@@ -27,6 +29,7 @@ public class PlayerShoot : NetworkBehaviour
if (!isActive) return;
if (playerHealth == null || playerHealth.isDead.Value) return;
if (playerShield != null && playerShield.IsShieldUp) return;
if (Input.GetMouseButtonDown(0))
{
@@ -50,7 +53,8 @@ public class PlayerShoot : NetworkBehaviour
return;
}
if (_hit.collider.TryGetComponent(out PlayerHealth _playerHealth))
PlayerHealth _playerHealth = _hit.collider.GetComponentInParent<PlayerHealth>();
if (_playerHealth != null)
{
_playerHealth.TakeDamage((int)damageAmount);
}