using UnityEngine; public class PointBlankGameManager : MonoBehaviour { public static PointBlankGameManager Instance; [SerializeField] private Color ambientColor = new Color(0.15f, 0.15f, 0.18f); [SerializeField] private Color fogColor = new Color(0.1f, 0.1f, 0.12f); [SerializeField] private float fogDensity = 0.035f; [SerializeField] private GameObject bloodParticlePrefab; [SerializeField] private GameObject bulletHitEffectPrefab; private void Awake() { Instance = this; SetupAtmosphere(); } private void SetupAtmosphere() { RenderSettings.ambientMode = UnityEngine.Rendering.AmbientMode.Flat; RenderSettings.ambientLight = ambientColor; RenderSettings.fog = true; RenderSettings.fogColor = fogColor; RenderSettings.fogMode = FogMode.ExponentialSquared; RenderSettings.fogDensity = fogDensity; } public void SpawnBloodEffect(Vector3 position, Vector3 normal) { if (bloodParticlePrefab != null) { GameObject blood = Instantiate(bloodParticlePrefab, position, Quaternion.LookRotation(normal)); Destroy(blood, 1.5f); } } public void SpawnHitEffect(Vector3 position, Vector3 normal) { if (bulletHitEffectPrefab != null) { GameObject hit = Instantiate(bulletHitEffectPrefab, position, Quaternion.LookRotation(normal)); Destroy(hit, 1f); } } } public interface IDamageable { void TakeDamage(float damage, Vector3 hitPoint, Vector3 hitNormal); }