private void AW_UtilityProjGhost() { var obj = PrefabsCore.CreatePrefab("PrimaryProjGhost", false); var ghostControl = obj.AddComponent <ProjectileGhostController>(); var skinner = obj.AddComponent <WispSkinnedEffect>(); var sound = obj.AddComponent <StartEndSound>(); sound.startSound = "Play_lemurianBruiser_m1_fly_loop"; sound.endSound = "Stop_lemurianBruiser_m1_fly_loop"; sound.mult = 2; //Play_greater_wisp_active_loop //Stop_greater_wisp_active_loop if (!this.AW_lowPerf.Value) { var light = EffectHelper.AddLight(obj, skinner, true, 8f, 4f); } //var trail1 = EffectHelper.AddTrail( obj, skinner, MaterialType.Tracer, 0.5f, 1f, 0f, 0.5f, false ); //var trail2 = EffectHelper.AddTrail( obj, skinner, MaterialType.Tracer, 0.5f, 1f, 0f, 0.5f, false ); //var rotator = EffectHelper.AddRotator( obj, new Vector3( 0f, 0f, 360f ), Vector3.forward, 1f, trail1.transform, trail2.transform ); var flame = EffectHelper.AddFire(obj, skinner, MaterialType.Flames, 10f, 0.3f, 5f, 1f, 0f, true); AW_utilityProjGhost = obj; }
private void AW_UtilityChargeEffect() { var obj = PrefabsCore.CreatePrefab("UtilityChargeEffect", false); var skinner = obj.AddComponent <WispSkinnedEffect>(); if (!this.AW_lowPerf.Value) { var light = EffectHelper.AddLight(obj, skinner, true, 4f, 2f); } var chargeLines = EffectHelper.AddChargeSphereLines(obj, skinner, MaterialType.Tracer, 0.75f, 0.15f, 0.05f, 30f); var arcCircle = EffectHelper.AddArcaneCircle(obj, skinner, MaterialType.ArcaneCircle, 5f, 2f); var arcMain = arcCircle.main; arcMain.simulationSpace = ParticleSystemSimulationSpace.Local; arcMain.emitterVelocityMode = ParticleSystemEmitterVelocityMode.Transform; var arcEmis = arcCircle.emission; arcEmis.burstCount = 1; arcEmis.SetBurst(0, new ParticleSystem.Burst(0f, 1f, 1, 0.01f)); var arcShape = arcCircle.shape; arcShape.enabled = false; var arcCOL = arcCircle.colorOverLifetime; arcCOL.enabled = true; arcCOL.color = new ParticleSystem.MinMaxGradient(new Gradient { mode = GradientMode.Blend, alphaKeys = new[] { new GradientAlphaKey(0f, 0f), new GradientAlphaKey(1f, 1f), }, colorKeys = new[] { new GradientColorKey(Color.white, 0f), new GradientColorKey(Color.white, 0f), }, }); var arcSOL = arcCircle.sizeOverLifetime; arcSOL.enabled = true; arcSOL.separateAxes = false; arcSOL.size = new ParticleSystem.MinMaxCurve(1f, AnimationCurve.Linear(0f, 1f, 1f, 0f)); var arcROL = arcCircle.rotationOverLifetime; arcROL.enabled = true; arcROL.z = 2f; AW_utilityChargeEffect = obj; }
private void AW_PrimaryProjGhost() { var obj = PrefabsCore.CreatePrefab("PrimaryProjGhost", false); var ghostControl = obj.AddComponent <ProjectileGhostController>(); var skinner = obj.AddComponent <WispSkinnedEffect>(); if (!this.AW_lowPerf.Value) { var light = EffectHelper.AddLight(obj, skinner, true, 8f, 4f); } var trail1 = EffectHelper.AddTrail(obj, skinner, MaterialType.Tracer, 0.5f, 1f, 0f, 0.5f, false); var trail2 = EffectHelper.AddTrail(obj, skinner, MaterialType.Tracer, 0.5f, 1f, 0f, 0.5f, false); var rotator = EffectHelper.AddRotator(obj, new Vector3(0f, 0f, 360f), Vector3.forward, 1f, trail1.transform, trail2.transform); var flame = EffectHelper.AddFire(obj, skinner, MaterialType.Flames, 4f, 0.3f, 5f, 1f, 0f, true); AW_primaryProjGhost = obj; }
private void AW_PrimaryExplosionEffect() { var obj = PrefabsCore.CreatePrefab("PrimaryExplosionEffect", false); var effComp = obj.AddComponent <EffectComponent>(); effComp.positionAtReferencedTransform = false; effComp.parentToReferencedTransform = false; effComp.applyScale = true; effComp.soundName = "Play_item_use_meteor_impact"; var vfxAttrib = obj.AddComponent <VFXAttributes>(); vfxAttrib.vfxPriority = VFXAttributes.VFXPriority.Always; vfxAttrib.vfxIntensity = VFXAttributes.VFXIntensity.Low; var skinner = obj.AddComponent <WispSkinnedEffect>(); var flash = EffectHelper.AddFlash(obj, skinner, MaterialType.Tracer, 2f); var flashLines = EffectHelper.AddFlashLines(obj, skinner, MaterialType.Tracer, 30, 0.05f, 0.05f, 1f); var flashLineShape = flashLines.shape; flashLineShape.enabled = true; flashLineShape.shapeType = ParticleSystemShapeType.Cone; flashLineShape.radius = 0.01f; flashLineShape.length = 1f; flashLineShape.angle = 60f; flashLineShape.rotation = new Vector3(-90f, 0f, 0f); flashLineShape.radiusThickness = 0.5f; if (!this.AW_lowPerf.Value) { var distortion = EffectHelper.AddDistortion(obj, skinner, MaterialType.DistortionHeavy, 2f, 0.25f, 0f); var distortionEmis = distortion.emission; distortionEmis.enabled = true; distortionEmis.burstCount = 1; distortionEmis.SetBurst(0, new ParticleSystem.Burst(0f, 1f, 1, 0.1f)); var distortionSOL = distortion.sizeOverLifetime; distortionSOL.enabled = true; distortionSOL.size = new ParticleSystem.MinMaxCurve(1f, AnimationCurve.Linear(0f, 0f, 1f, 1f)); } var explosion = EffectHelper.AddExplosion(obj, skinner, MaterialType.Explosion, 15, 0.25f, 5f, 1f); var explMain = explosion.main; explMain.gravityModifier = 0.5f; var explShape = explosion.shape; explShape.enabled = true; explShape.shapeType = ParticleSystemShapeType.Cone; explShape.angle = 60f; explShape.radius = 0.25f; explShape.rotation = new Vector3(-90f, 0f, 0f); if (!this.AW_lowPerf.Value) { var light = EffectHelper.AddLight(obj, skinner, true, 10f, 10f); light.transform.localPosition += new Vector3(0f, 0.5f, 0f); EffectHelper.EditLightOverTime(light, 0.5f, AnimationCurve.EaseInOut(0f, 1f, 1f, 0f), AnimationCurve.EaseInOut(0f, 1f, 1f, 0f)); } AW_primaryExplosionEffect = obj; RegisterEffect(AW_primaryExplosionEffect); }
private void AW_SecondaryExplosion() { var obj = PrefabsCore.CreatePrefab("SecondaryExplosionEffect", false); var effComp = obj.AddComponent <EffectComponent>(); effComp.positionAtReferencedTransform = false; effComp.parentToReferencedTransform = false; effComp.applyScale = false; effComp.soundName = null; var skin = obj.AddComponent <WispSkinnedEffect>(); var vecScale = obj.AddComponent <EffectVectorScale>(); vecScale.effectComp = effComp; vecScale.applyX = true; vecScale.applyY = false; vecScale.applyZ = true; vecScale.durationFrac = 0f; vecScale.scaleOverTime = false; var vfxAtrib = obj.AddComponent <VFXAttributes>(); vfxAtrib.vfxPriority = VFXAttributes.VFXPriority.Always; vfxAtrib.vfxIntensity = VFXAttributes.VFXIntensity.Low; var timer = obj.AddComponent <DestroyOnTimer>(); timer.duration = 1f; var sounds = obj.AddComponent <EffectSoundPlayer>(); sounds.AddSound(new SoundEvent(0f, "Play_gravekeeper_attack2_shoot", 1f)); var flash1 = EffectHelper.AddFlash(obj, skin, MaterialType.Tracer); var flash1Main = flash1.main; flash1Main.scalingMode = ParticleSystemScalingMode.Local; var pillar = EffectHelper.AddFlamePillar(obj, skin, MaterialType.FlamePillar, 1000f, 3f, 0.75f); if (!this.AW_lowPerf.Value) { var sparks = EffectHelper.AddSparks(obj, skin, MaterialType.Tracer, 5000, 0.15f, 1.2f); var sparkMain = sparks.main; sparkMain.scalingMode = ParticleSystemScalingMode.Shape; sparkMain.maxParticles = 10000; var sparkShape = sparks.shape; sparkShape.enabled = true; sparkShape.shapeType = ParticleSystemShapeType.ConeVolume; sparkShape.angle = 0f; sparkShape.radius = 2f; sparkShape.length = 1000f; sparkShape.rotation = new Vector3(-90f, 0f, 0f); } var flashLines = EffectHelper.AddFlashLines(obj, skin, MaterialType.Tracer, 10, 0.2f); var flashLinesMain = flashLines.main; flashLinesMain.scalingMode = ParticleSystemScalingMode.Shape; var flashLineShape = flashLines.shape; flashLineShape.enabled = true; flashLineShape.shapeType = ParticleSystemShapeType.Cone; flashLineShape.radius = 1f; flashLineShape.length = 5f; flashLineShape.angle = 30f; flashLineShape.rotation = new Vector3(-90f, 0f, 0f); //var explosion = EffectHelper.AddExplosion( obj, skin, MaterialType.Explosion, 20, 0.3f, 5, 5f ); //var explShape = explosion.shape; //explShape.enabled = true; //explShape.shapeType = ParticleSystemShapeType.Hemisphere; //explShape.radius = 0.5f; //explShape.rotation = new Vector3( -90f, 0f, 0f ); if (!this.AW_lowPerf.Value) { var light = EffectHelper.AddLight(obj, skin, true, 20f, 100f); light.transform.localPosition += new Vector3(0f, 3f, 0f); EffectHelper.EditLightOverTime(light, 2f, AnimationCurve.EaseInOut(0f, 1f, 1f, 0f), AnimationCurve.EaseInOut(0f, 1f, 1f, 0f)); } if (!this.AW_lowPerf.Value) { var distortion = EffectHelper.AddDistortion(obj, skin, MaterialType.Distortion, 8f, 0.3f, 0f); } AW_secondaryExplosion = obj; RegisterEffect(AW_secondaryExplosion); }
private void RW_CreateNewSecondaryExplosion() { var obj = new GameObject().ClonePrefab("SecondaryExplosion", false); var effComp = obj.AddComponent <EffectComponent>(); effComp.positionAtReferencedTransform = false; effComp.parentToReferencedTransform = false; effComp.applyScale = false; effComp.soundName = "Play_item_use_meteor_impact"; var skin = obj.AddComponent <WispSkinnedEffect>(); var vfxAtrib = obj.AddComponent <VFXAttributes>(); vfxAtrib.vfxPriority = VFXAttributes.VFXPriority.Always; vfxAtrib.vfxIntensity = VFXAttributes.VFXIntensity.Low; var timer = obj.AddComponent <DestroyOnTimer>(); timer.duration = 4f; var flash1 = EffectHelper.AddFlash(obj, skin, MaterialType.Tracer); var pillar = EffectHelper.AddFlamePillar(obj, skin, MaterialType.FlamePillar, 20f, 4f, 0.35f, 8); var sparks = EffectHelper.AddSparks(obj, skin, MaterialType.Tracer, 100, 0.15f, 1.2f); var sparkShape = sparks.shape; sparkShape.enabled = true; sparkShape.shapeType = ParticleSystemShapeType.ConeVolume; sparkShape.angle = 0f; sparkShape.radius = 3.5f; sparkShape.length = 20f; sparkShape.rotation = new Vector3(-90f, 0f, 0f); var flashLines = EffectHelper.AddFlashLines(obj, skin, MaterialType.Tracer, 20, 0.2f); var flashLineShape = flashLines.shape; flashLineShape.enabled = true; flashLineShape.shapeType = ParticleSystemShapeType.Cone; flashLineShape.radius = 3.5f; flashLineShape.length = 5f; flashLineShape.angle = 30f; flashLineShape.rotation = new Vector3(-90f, 0f, 0f); var explosion = EffectHelper.AddExplosion(obj, skin, MaterialType.Explosion, 40, 0.2f, 5, 8f); var explShape = explosion.shape; explShape.enabled = true; explShape.shapeType = ParticleSystemShapeType.Hemisphere; explShape.radius = 0.75f; explShape.rotation = new Vector3(-90f, 0f, 0f); var light = EffectHelper.AddLight(obj, skin, true, 10f, 100f); light.transform.localPosition += new Vector3(0f, 3f, 0f); EffectHelper.EditLightOverTime(light, 2f, AnimationCurve.EaseInOut(0f, 1f, 1f, 0f), AnimationCurve.EaseInOut(0f, 1f, 1f, 0f)); var distortion = EffectHelper.AddDistortion(obj, skin, MaterialType.DistortionHeavy, 12f, 0.35f, 0.1f); var distEmis = distortion.emission; distEmis.burstCount = 1; distEmis.SetBurst(0, new ParticleSystem.Burst(0f, 1)); secondaryExplosion = obj; RegisterEffect(secondaryExplosion); }