TG9six 03a642d635 first push
first push
2025-09-06 17:17:39 +04:00

27 lines
778 B
C#

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();
}
}