private static void CreateLightningExplosion() { explosionLightningPrefab = CreateBlinkExplosion("ManipulatorLightningBlink", explosionDelay, explosionBlastRadius, explosionDamage, DamageType.Generic, false); ProjectileBlinkExplosion lightningWaveChild = explosionLightningPrefab.GetComponent <ProjectileBlinkExplosion>(); lightningWaveChild.childrenProjectilePrefab = CreateLightningWaveExplosion(StatValues.blinkLightningRadius, StatValues.blinkLightningDelay); lightningWaveChild.fireChildren = true; lightningWaveChild.childrenCount = 1; lightningWaveChild.impactEffect = Resources.Load <GameObject>("Prefabs/Effects/ImpactEffects/OmniExplosionVFXQuick"); lightningWaveChild.childrenDamageCoefficient = 0.5f; }
private static GameObject CreateBlinkExplosion(string newExplosionName, float newExplosionDelay, float newBlastRadius, float newBlastDamage, DamageType damageType, bool iceBuff) { GameObject newBlinkPrefab = CloneProjectilePrefab("CommandoGrenadeProjectile", newExplosionName); UnityEngine.GameObject.Destroy(newBlinkPrefab.GetComponent <ProjectileImpactExplosion>()); ProjectileBlinkExplosion newBlinkExplosion = newBlinkPrefab.AddComponent <ProjectileBlinkExplosion>(); ProjectileController newBlinkController = newBlinkPrefab.GetComponent <ProjectileController>(); Rigidbody newBlinkBody = newBlinkPrefab.GetComponent <Rigidbody>(); ProjectileSimple newBlinkProjectile = newBlinkPrefab.GetComponent <ProjectileSimple>(); newBlinkPrefab.GetComponent <ProjectileDamage>().damageType = damageType; newBlinkBody.useGravity = false; newBlinkProjectile.desiredForwardSpeed = 0f; newBlinkExplosion.lifetime = newExplosionDelay; newBlinkExplosion.timerAfterImpact = false; newBlinkExplosion.blastRadius = newBlastRadius; newBlinkExplosion.blastDamageCoefficient = newBlastDamage; newBlinkExplosion.useIceDebuff = iceBuff; return(newBlinkPrefab); }