// Token: 0x06000895 RID: 2197 RVA: 0x00037A10 File Offset: 0x00035C10 public static void ShowExplosionEffect(ParticleConfigurationType effectType, SurfaceEffectType surface, Vector3 hitPoint, Vector3 hitNormal) { if (ParticleEffectController.Exists && ParticleEffectController.CheckVisibility(hitPoint)) { ParticleConfigurationPerWeapon particleConfigurationPerWeapon = ParticleEffectController.Instance._allConfigurations[effectType]; bool flag = false; if (particleConfigurationPerWeapon != null) { switch (surface) { case SurfaceEffectType.WoodEffect: ParticleEmissionSystem.HitMateriaHalfSphericParticles(hitPoint, hitNormal, particleConfigurationPerWeapon.WeaponImpactEffectConfiguration.SurfaceParameterSet.WoodEffect); break; case SurfaceEffectType.WaterEffect: ParticleEmissionSystem.WaterCircleParticles(hitPoint, hitNormal, particleConfigurationPerWeapon.WeaponImpactEffectConfiguration.SurfaceParameterSet.WaterCircleEffect); ParticleEmissionSystem.WaterSplashParticles(hitPoint, hitNormal, particleConfigurationPerWeapon.WeaponImpactEffectConfiguration.SurfaceParameterSet.WaterExtraSplashEffect); break; case SurfaceEffectType.StoneEffect: ParticleEmissionSystem.HitMateriaHalfSphericParticles(hitPoint, hitNormal, particleConfigurationPerWeapon.WeaponImpactEffectConfiguration.SurfaceParameterSet.StoneEffect); break; case SurfaceEffectType.MetalEffect: ParticleEmissionSystem.HitMateriaHalfSphericParticles(hitPoint, hitNormal, particleConfigurationPerWeapon.WeaponImpactEffectConfiguration.SurfaceParameterSet.MetalEffect); break; case SurfaceEffectType.GrassEffect: ParticleEmissionSystem.HitMateriaHalfSphericParticles(hitPoint, hitNormal, particleConfigurationPerWeapon.WeaponImpactEffectConfiguration.SurfaceParameterSet.GrassEffect); break; case SurfaceEffectType.SandEffect: ParticleEmissionSystem.HitMateriaHalfSphericParticles(hitPoint, hitNormal, particleConfigurationPerWeapon.WeaponImpactEffectConfiguration.SurfaceParameterSet.SandEffect); break; case SurfaceEffectType.Splat: ParticleEmissionSystem.HitMateriaFullSphericParticles(hitPoint, hitNormal, particleConfigurationPerWeapon.WeaponImpactEffectConfiguration.SurfaceParameterSet.Splat); break; } bool flag2 = QualitySettings.GetQualityLevel() > 0; if (flag2) { ParticleEffectController.Instance._explosionParticleSystem.EmitDust(hitPoint, hitNormal, particleConfigurationPerWeapon.WeaponImpactEffectConfiguration.ExplosionParameterSet.DustParameters); ParticleEffectController.Instance._explosionParticleSystem.EmitSmoke(hitPoint, hitNormal, particleConfigurationPerWeapon.WeaponImpactEffectConfiguration.ExplosionParameterSet.SmokeParameters); } if (flag2 || flag) { ParticleEffectController.Instance._explosionParticleSystem.EmitTrail(hitPoint, hitNormal, particleConfigurationPerWeapon.WeaponImpactEffectConfiguration.ExplosionParameterSet.TrailParameters); } ParticleEffectController.Instance._explosionParticleSystem.EmitBlast(hitPoint, hitNormal, particleConfigurationPerWeapon.WeaponImpactEffectConfiguration.ExplosionParameterSet.BlastParameters); ParticleEffectController.Instance._explosionParticleSystem.EmitRing(hitPoint, hitNormal, particleConfigurationPerWeapon.WeaponImpactEffectConfiguration.ExplosionParameterSet.RingParameters); ParticleEffectController.Instance._explosionParticleSystem.EmitSpark(hitPoint, hitNormal, particleConfigurationPerWeapon.WeaponImpactEffectConfiguration.ExplosionParameterSet.SparkParameters); } } }
// Token: 0x06000896 RID: 2198 RVA: 0x00037C48 File Offset: 0x00035E48 private static void WaterRipplesEffect(ParticleConfigurationPerWeapon effect, Vector3 hitPoint, Vector3 direction, Vector3 muzzlePosition, float distance) { float d = Math.Abs(muzzlePosition.y) * distance / (Math.Abs(hitPoint.y) + Math.Abs(muzzlePosition.y)); Vector3 vector = direction * d + muzzlePosition; if (ParticleEffectController.CanPlayEffectAt(vector) && ParticleEffectController.CheckVisibility(vector)) { ParticleEmissionSystem.WaterSplashParticles(vector, Vector3.up, effect.WeaponImpactEffectConfiguration.SurfaceParameterSet.WaterExtraSplashEffect); ParticleEmissionSystem.WaterCircleParticles(vector, Vector3.up, effect.WeaponImpactEffectConfiguration.SurfaceParameterSet.WaterCircleEffect); } }
// Token: 0x06000893 RID: 2195 RVA: 0x00037754 File Offset: 0x00035954 public static void ShowHitEffect(ParticleConfigurationType effectType, SurfaceEffectType surface, Vector3 direction, Vector3 hitPoint, Vector3 hitNormal, Vector3 muzzlePosition, float distance, ref MoveTrailrendererObject trailRenderer, Transform parent, int damage) { if (ParticleEffectController.Exists) { ParticleConfigurationPerWeapon particleConfigurationPerWeapon = ParticleEffectController.Instance._allConfigurations[effectType]; if (particleConfigurationPerWeapon != null) { ParticleEffectController.ShowTrailEffect(particleConfigurationPerWeapon, trailRenderer, parent, hitPoint, muzzlePosition, distance, direction); switch (surface) { case SurfaceEffectType.Default: if (ParticleEffectController.CheckVisibility(hitPoint)) { ParticleEmissionSystem.FireParticles(hitPoint, hitNormal, particleConfigurationPerWeapon.WeaponImpactEffectConfiguration.FireParticleConfigurationForInstantHit); } break; case SurfaceEffectType.WoodEffect: if (ParticleEffectController.CheckVisibility(hitPoint)) { ParticleEmissionSystem.HitMaterialParticles(hitPoint, hitNormal, particleConfigurationPerWeapon.WeaponImpactEffectConfiguration.SurfaceParameterSet.WoodEffect); ParticleEmissionSystem.FireParticles(hitPoint, hitNormal, particleConfigurationPerWeapon.WeaponImpactEffectConfiguration.FireParticleConfigurationForInstantHit); } break; case SurfaceEffectType.WaterEffect: if (ParticleEffectController.CheckVisibility(hitPoint)) { ParticleEmissionSystem.WaterCircleParticles(hitPoint, hitNormal, particleConfigurationPerWeapon.WeaponImpactEffectConfiguration.SurfaceParameterSet.WaterCircleEffect); } break; case SurfaceEffectType.StoneEffect: if (ParticleEffectController.CheckVisibility(hitPoint)) { ParticleEmissionSystem.HitMaterialParticles(hitPoint, hitNormal, particleConfigurationPerWeapon.WeaponImpactEffectConfiguration.SurfaceParameterSet.StoneEffect); ParticleEmissionSystem.FireParticles(hitPoint, hitNormal, particleConfigurationPerWeapon.WeaponImpactEffectConfiguration.FireParticleConfigurationForInstantHit); } break; case SurfaceEffectType.MetalEffect: if (ParticleEffectController.CheckVisibility(hitPoint)) { ParticleEmissionSystem.HitMaterialParticles(hitPoint, hitNormal, particleConfigurationPerWeapon.WeaponImpactEffectConfiguration.SurfaceParameterSet.MetalEffect); ParticleEmissionSystem.FireParticles(hitPoint, hitNormal, particleConfigurationPerWeapon.WeaponImpactEffectConfiguration.FireParticleConfigurationForInstantHit); } break; case SurfaceEffectType.GrassEffect: if (ParticleEffectController.CheckVisibility(hitPoint)) { ParticleEmissionSystem.HitMaterialParticles(hitPoint, hitNormal, particleConfigurationPerWeapon.WeaponImpactEffectConfiguration.SurfaceParameterSet.GrassEffect); ParticleEmissionSystem.FireParticles(hitPoint, hitNormal, particleConfigurationPerWeapon.WeaponImpactEffectConfiguration.FireParticleConfigurationForInstantHit); } break; case SurfaceEffectType.SandEffect: if (ParticleEffectController.CheckVisibility(hitPoint)) { ParticleEmissionSystem.HitMaterialParticles(hitPoint, hitNormal, particleConfigurationPerWeapon.WeaponImpactEffectConfiguration.SurfaceParameterSet.SandEffect); ParticleEmissionSystem.FireParticles(hitPoint, hitNormal, particleConfigurationPerWeapon.WeaponImpactEffectConfiguration.FireParticleConfigurationForInstantHit); } break; case SurfaceEffectType.Splat: if (ParticleEffectController.CheckVisibility(hitPoint)) { ParticleEmissionSystem.HitMaterialRotatingParticles(hitPoint, hitNormal, particleConfigurationPerWeapon.WeaponImpactEffectConfiguration.SurfaceParameterSet.Splat); } break; } } } else { Debug.LogError("ParticleEffectController is not attached to a gameobject in scene!"); } }