using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.VFX; public class FuturisticBullet : ProjectileBase { protected override void OnHitEntity(Collision col) { HitEffect(col); } private void HitEffect(Collision col) { if (col.gameObject.layer != LayerMask.NameToLayer("Enemy")) { Vector3 normal = col.GetContact(0).normal; Vector3 contactPosition = col.GetContact(0).point + normal * 0.25f; GameObject hitEffect = NetworkPooler.Instance.PooledPlayEffect("FuturisticHitEffect", contactPosition, Quaternion.identity, 4.0f); hitEffect.transform.up = normal; HitEffectShadows(hitEffect); } PooledDestroy(); } }