// 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: 0x06001E33 RID: 7731 RVA: 0x000949EC File Offset: 0x00092BEC protected void EmitImpactParticles(RaycastHit hit, Vector3 direction, Vector3 muzzlePosition, float distance, bool playSound) { string tag = TagUtil.GetTag(hit.collider); Vector3 point = hit.point; Vector3 hitNormal = hit.normal; SurfaceEffectType surface = SurfaceEffectType.Default; if (this._effectMap.TryGetValue(tag, out surface)) { if (GameState.Current.Map != null && GameState.Current.Map.HasWaterPlane && ((this._muzzlePosition.position.y > GameState.Current.Map.WaterPlaneHeight && point.y < GameState.Current.Map.WaterPlaneHeight) || (this._muzzlePosition.position.y < GameState.Current.Map.WaterPlaneHeight && point.y > GameState.Current.Map.WaterPlaneHeight))) { surface = SurfaceEffectType.WaterEffect; hitNormal = Vector3.up; point.y = GameState.Current.Map.WaterPlaneHeight; if (!Mathf.Approximately(direction.y, 0f)) { point.x = (GameState.Current.Map.WaterPlaneHeight - hit.point.y) / direction.y * direction.x + hit.point.x; point.z = (GameState.Current.Map.WaterPlaneHeight - hit.point.y) / direction.y * direction.z + hit.point.z; } } ParticleEffectController.ShowHitEffect(this._effectType, surface, direction, point, hitNormal, muzzlePosition, distance, ref this._trailRenderer, this._parent); } }
// 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!"); } }
// Token: 0x06000892 RID: 2194 RVA: 0x00037730 File Offset: 0x00035930 public static void ShowHitEffect(ParticleConfigurationType effectType, SurfaceEffectType surface, Vector3 direction, Vector3 hitPoint, Vector3 hitNormal, Vector3 muzzlePosition, float distance, ref MoveTrailrendererObject trailRenderer, Transform parent) { ParticleEffectController.ShowHitEffect(effectType, surface, direction, hitPoint, hitNormal, muzzlePosition, distance, ref trailRenderer, parent, 0); }