private void RW_CreateNewUtilityIndicator() { var obj = new GameObject().ClonePrefab("UtilityAim", false); obj.layer = LayerIndex.entityPrecise.intVal; var effComp = obj.AddComponent <EffectComponent>(); effComp.positionAtReferencedTransform = false; effComp.parentToReferencedTransform = false; effComp.applyScale = true; effComp.soundName = ""; EffectHelper.AddSound(obj, "Play_lemurianBruiser_m2_loop", "Stop_lemurianBruiser_m2_loop", 0.0f, 10.0f); var skin = obj.AddComponent <WispSkinnedEffect>(); var vfxAtrib = obj.AddComponent <VFXAttributes>(); vfxAtrib.vfxPriority = VFXAttributes.VFXPriority.Always; vfxAtrib.vfxIntensity = VFXAttributes.VFXIntensity.Low; var destroyOnEnd = obj.AddComponent <DestroyOnEffectTimer>(); destroyOnEnd.effectComp = effComp; EffectHelper.AddMeshIndicator(obj, skin, MaterialType.AreaIndicator, MeshIndex.Sphere, false); EffectHelper.AddMeshIndicator(obj, skin, MaterialType.AreaIndicator2, MeshIndex.Sphere, false); //var tornado = EffectHelper.AddFlameTornado( obj, skin, MaterialType.FlameTornado, 1f, 10f, 7.5f, 7.5f ); //var tornadoMain = tornado.main; //tornadoMain.startSizeX = 7.5f; //tornadoMain.startSizeY = 7.5f; //var tornadoSOL = tornado.sizeOverLifetime; //tornadoSOL.enabled = true; //tornadoSOL.separateAxes = true; //tornadoSOL.x = new ParticleSystem.MinMaxCurve( 1f, AnimationCurve.Linear( 0f, 1f, 1f, 0f ) ); //tornadoSOL.y = new ParticleSystem.MinMaxCurve( 1f, AnimationCurve.Linear( 0f, 1f, 1f, 0f ) ); //tornadoSOL.z = new ParticleSystem.MinMaxCurve( 1f, AnimationCurve.EaseInOut( 0f, 0.9f, 1f, 1f ) ); var fire = EffectHelper.AddFire(obj, skin, MaterialType.Flames, 3f, 1.5f, 30f, 0f, -1f, true); var fireMain = fire.main; fireMain.scalingMode = ParticleSystemScalingMode.Local; //var col = obj.AddComponent<SphereCollider>(); //col.isTrigger = true; //col.center = Vector3.zero; //col.radius = 0.5f; //col.material = null; //var slow = obj.AddComponent<SlowDownProjectiles>(); //slow.maxVelocityMagnitude = 20f; //slow.antiGravity = 0f; utilityIndicator = obj; RegisterEffect(utilityIndicator); }
private void RW_CreateNewUtilityAim() { var obj = new GameObject().ClonePrefab("UtilityAim", false); var skin = obj.AddComponent <WispSkinnedEffect>(); var end = new GameObject("lineEnd"); end.transform.parent = obj.transform; end.transform.localPosition = Vector3.zero; end.transform.localScale = Vector3.one; end.transform.localRotation = Quaternion.identity; EffectHelper.AddMeshIndicator(end, skin, MaterialType.AreaIndicator, MeshIndex.Sphere, false); EffectHelper.AddMeshIndicator(end, skin, MaterialType.AreaIndicator2, MeshIndex.Sphere, false); utilityAim = obj; }
private void AW_UtilityZoneGhost() { var obj = PrefabsCore.CreatePrefab("PrimaryProjGhost", false); var sound = obj.AddComponent <StartEndSound>(); sound.startSound = "Play_lemurianBruiser_m2_loop"; sound.endSound = "Stop_lemurianBruiser_m2_loop"; sound.mult = 5; //sound.startSound = "Play_magmaWorm_idle_burn_loop"; //sound.endSound = "Stop_magmaWorm_idle_burn_loop"; var ghostControl = obj.AddComponent <ProjectileGhostController>(); var skinner = obj.AddComponent <WispSkinnedEffect>(); var vecScale = obj.AddComponent <EffectVectorScale>(); vecScale.scaleOverTime = true; vecScale.durationFrac = 1f; vecScale.duration = 10f; vecScale.startScale = new Vector3(1f, 1f, 1f); vecScale.endScale = new Vector3(150f, 150f, 150f); vecScale.useEffectComponent = false; //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 ); //var tornado = EffectHelper.AddFlameTornado( obj, skinner, MaterialType.FlameTornado, 1f , 10f, 10f, 5f ); var indicator = EffectHelper.AddMeshIndicator(obj, skinner, MaterialType.BossAreaExplosion, MeshIndex.Sphere, false); AW_utilityZoneGhost = obj; }
private void AW_SecondaryPredictionEffect() { var obj = PrefabsCore.CreatePrefab("SecondaryPredictionEffect", false); var effComp = obj.AddComponent <EffectComponent>(); effComp.positionAtReferencedTransform = false; effComp.parentToReferencedTransform = false; effComp.applyScale = false; effComp.soundName = "Play_elite_antiHeal_turret_die"; var sound = obj.AddComponent <StartEndSound>(); sound.startSound = "Play_elite_antiHeal_turret_die"; sound.mult = 2; var skinner = obj.AddComponent <WispSkinnedEffect>(); var vecScale = obj.AddComponent <EffectVectorScale>(); vecScale.effectComp = effComp; vecScale.applyX = true; vecScale.applyY = false; vecScale.applyZ = true; vecScale.scaleOverTime = true; vecScale.durationFrac = 0.2f; var vfxAtrib = obj.AddComponent <VFXAttributes>(); vfxAtrib.vfxPriority = VFXAttributes.VFXPriority.Always; vfxAtrib.vfxIntensity = VFXAttributes.VFXIntensity.Low; var timer = obj.AddComponent <DestroyOnEffectTimer>(); timer.effectComp = effComp; var indicator = EffectHelper.AddMeshIndicator(obj, skinner, MaterialType.BossAreaIndicator, MeshIndex.Cylinder, false, false, 0.5f, 1f, true, false, true); indicator.transform.localScale = new Vector3(1f, 1000f, 1f); indicator.transform.localPosition = new Vector3(0f, 995f, 0f); //var indPS = indicator.GetComponent<ParticleSystem>(); //timer.AddLifetimeParticle( indPS ); //var indPSMain = indPS.main; //indPSMain.maxParticles = 100; //var indPSCOL = indPS.colorOverLifetime; //indPSCOL.enabled = false; //indPSCOL.color = new ParticleSystem.MinMaxGradient( new Gradient //{ // mode = GradientMode.Blend, // alphaKeys = new[] // { // new GradientAlphaKey( 0f, 0f ), // new GradientAlphaKey( 1f, 0.1f ), // new GradientAlphaKey( 1f, 1f ), // }, // colorKeys = new[] // { // new GradientColorKey( Color.white, 0f ), // new GradientColorKey( Color.white, 1f ), // }, //} ); AW_secondaryPrediction = obj; RegisterEffect(AW_secondaryPrediction); }