private void UponStopped(RaycastHit2D hit, ICollisionSurface surfaceData, Vector2 dir) { // Called whenever the projectile is stopped in it's tracks by an object that it can't penetrate. SpawnHitEffect(surfaceData.GetHitEffect() ?? HitEffectPrefab, hit.point, hit.normal); DealDamage(hit, surfaceData, false, false, dir); }
private void UponPenetrate(RaycastHit2D hit, ICollisionSurface surfaceData, Vector2 dir) { // Called whenever the projectile penetrates a surface. SpawnHitEffect(surfaceData.GetHitEffect() ?? HitEffectPrefab, hit.point, hit.normal); DealDamage(hit, surfaceData, true, false, dir); }