Example #1
0
    // 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);
            }
        }
    }
Example #2
0
    // 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);
        }
    }
Example #3
0
 // Token: 0x06000899 RID: 2201 RVA: 0x00037D50 File Offset: 0x00035F50
 public static void ProjectileWaterRipplesEffect(ParticleConfigurationType effectType, Vector3 hitPosition)
 {
     if (ParticleEffectController.Exists && GameState.Current.Map != null)
     {
         ParticleConfigurationPerWeapon particleConfigurationPerWeapon = ParticleEffectController.Instance._allConfigurations[effectType];
         if (particleConfigurationPerWeapon != null)
         {
             ParticleEmissionSystem.WaterSplashParticles(hitPosition, Vector3.up, particleConfigurationPerWeapon.WeaponImpactEffectConfiguration.SurfaceParameterSet.WaterExtraSplashEffect);
             ParticleEmissionSystem.WaterCircleParticles(hitPosition, Vector3.up, particleConfigurationPerWeapon.WeaponImpactEffectConfiguration.SurfaceParameterSet.WaterCircleEffect);
         }
     }
 }