示例#1
0
        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 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);
        }
示例#3
0
        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;
        }
示例#4
0
        private void AW_UtilityOrbEffect()
        {
            var obj = PrefabsCore.CreatePrefab("LeechOrb", false);

            var effComp = obj.AddComponent <EffectComponent>();

            effComp.positionAtReferencedTransform = false;
            effComp.parentToReferencedTransform   = false;
            effComp.applyScale = true;
            effComp.soundName  = "Play_gravekeeper_attack1_fire";

            var skin = obj.AddComponent <WispSkinnedEffect>();


            var vfxAtrib = obj.AddComponent <VFXAttributes>();

            vfxAtrib.vfxPriority  = VFXAttributes.VFXPriority.Always;
            vfxAtrib.vfxIntensity = VFXAttributes.VFXIntensity.Low;

            var eventFuncs = obj.AddComponent <EventFunctions>();

            var orb = obj.AddComponent <WispOrbEffect>();

            orb.startVelocity1            = new Vector3(-10f, 10f, -10f);
            orb.startVelocity2            = new Vector3(10f, 0f, 10f);
            orb.endVelocity1              = new Vector3(-4f, 0f, -4f);
            orb.endVelocity2              = new Vector3(4f, 0f, 10f);
            orb.movementCurve             = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f);
            orb.faceMovement              = true;
            orb.callArrivalIfTargetIsGone = false;
            orb.soundString = "Play_treeBot_m1_hit_heal";


            var fireParticles = EffectHelper.AddFire(obj, skin, MaterialType.Flames, 2f, 0.3f, 20f, 10f, 0f, true);



            AW_utilityOrbEffect = obj;
            RegisterEffect(AW_utilityOrbEffect);
        }