Beispiel #1
0
    void UpdateLight(float param)
    {
        if (intensity.enabled){
            pp.maxConnections = (int)(intensity.Evaluate(param)*10);
            //GetComponent<Light>().intensity = intensity.Evaluate(param);

        }
        if (enableColor){
            pp.maxDistance = (int)(intensity.Evaluate(param)*5);
            pp.SC = colorGradient.Evaluate(param);
            pp.EC = colorGradient.Evaluate( 1 - param);
            //GetComponent<Light>().color = colorGradient.Evaluate(param);
        }
    }
        void Update()
        {
            var main = pStem.main;

            if (simSpeed.enabled)
            {
                main.simulationSpeed = simSpeed.Evaluate(reaktor.Output);
            }
        }
Beispiel #3
0
 void Update()
 {
     if (speed.enabled)
     {
         animator.speed = speed.Evaluate(reaktor.Output);
     }
     if (trigger.Update(reaktor.Output))
     {
         animator.SetTrigger(triggerName);
     }
 }
Beispiel #4
0
 void Update()
 {
     if (burst.Update(reaktor.Output))
     {
         fabricator.MakeInstance(burstNumber);
     }
     if (instantiationRate.enabled)
     {
         fabricator.instantiationRate = instantiationRate.Evaluate(reaktor.Output);
     }
 }
Beispiel #5
0
 void Update()
 {
     if (burst.Update(reaktor.Output))
     {
         spawner.Spawn(burstNumber);
     }
     if (spawnRate.enabled)
     {
         spawner.spawnRate = spawnRate.Evaluate(reaktor.Output);
     }
 }
 void Update()
 {
     if (position.enabled)
     {
         motion.position.velocity = position.Evaluate(reaktor.Output);
     }
     if (rotation.enabled)
     {
         motion.rotation.velocity = rotation.Evaluate(reaktor.Output);
     }
 }
Beispiel #7
0
 void UpdateLight(float param)
 {
     if (intensity.enabled)
     {
         light.intensity = intensity.Evaluate(param);
     }
     if (enableColor)
     {
         light.color = colorGradient.Evaluate(param);
     }
 }
Beispiel #8
0
 void UpdateLight(float param)
 {
     if (intensity.enabled)
     {
         GetComponent <Light>().intensity = intensity.Evaluate(param);
     }
     if (enableColor)
     {
         GetComponent <Light>().color = colorGradient.Evaluate(param);
     }
 }
    void Update()
    {
        if (burst.Update(reaktor.Output))
        {
            GetComponent<ParticleSystem>().Emit(burstNumber);
            GetComponent<ParticleSystem>().Play();
        }

        if (emissionRate.enabled)
            GetComponent<ParticleSystem>().emissionRate = emissionRate.Evaluate(reaktor.Output);

        if (size.enabled)
            ResizeParticles(size.Evaluate(reaktor.Output));
    }
Beispiel #10
0
 void UpdateColor(float param)
 {
     if (intensity.enabled)
     {
         GetComponent <Light>().intensity = intensity.Evaluate(param);
     }
     if (enableColor)
     {
         LineRenderer[] lines = GetComponentsInChildren <LineRenderer>();
         foreach (LineRenderer line in lines)
         {
             line.startColor = colorGradient.Evaluate(param);
             line.endColor   = colorGradient.Evaluate(param);
         }
     }
 }
Beispiel #11
0
        void Update()
        {
            if (burst.Update(reaktor.Output))
            {
                particleSystem.Emit(burstNumber);
                particleSystem.Play();
            }

            if (emissionRate.enabled)
            {
                particleSystem.emissionRate = emissionRate.Evaluate(reaktor.Output);
            }

            if (size.enabled)
            {
                ResizeParticles(size.Evaluate(reaktor.Output));
            }
        }
Beispiel #12
0
        void Update()
        {
            var o = curve.Evaluate(reaktor.Output);

            if (optionType == OptionType.Bool)
            {
                boolTarget.Invoke(0.5f <= o);
            }
            else if (optionType == OptionType.Int)
            {
                intTarget.Invoke((int)o);
            }
            else if (optionType == OptionType.Vector)
            {
                vectorTarget.Invoke(origin + direction * o);
            }
            else
            {
                floatTarget.Invoke(o);
            }
        }
        void UpdateLight(float param)
        {
            Animation[] anims  = GetComponentsInChildren <Animation>();
            Light[]     lights = GetComponentsInChildren <Light>();

            if (intensity.enabled)
            {
                foreach (Light light in lights)
                {
                    light.intensity = intensity.Evaluate(param);
                    if (param < 0.1f)
                    {
                        light.spotAngle = Mathf.Lerp(light.spotAngle, 30, 0.2f);
                    }
                    else
                    {
                        light.spotAngle = Mathf.Lerp(light.spotAngle, 12f, 0.2f);
                    }
                }
                foreach (Animation anim in anims)
                {
                    anim[anim.clip.name].speed = Mathf.Lerp(anim[anim.clip.name].speed, 1f * intensityMove.Evaluate(param), 0.3f);
                }
            }
            if (enableColor)
            {
                //LineRenderer[] lines = GetComponentsInChildren<LineRenderer>();
                foreach (Light light in lights)
                {
                    Color newcolor = colorGradient.Evaluate(param);
                    light.color = newcolor;
                }
                //{
                //    line.startColor = colorGradient.Evaluate(param);
                //    line.endColor = colorGradient.Evaluate(param);
                //}
            }
        }
Beispiel #14
0
        void Update()
        {
            if (fieldOfView.enabled)
            {
                GetComponent <Camera>().fieldOfView = fieldOfView.Evaluate(reaktor.Output);
            }

            if (viewportWidth.enabled || viewportHeight.enabled)
            {
                var rect = GetComponent <Camera>().rect;
                if (viewportWidth.enabled)
                {
                    rect.width = viewportWidth.Evaluate(reaktor.Output);
                    rect.x     = (1.0f - rect.width) * 0.5f;
                }
                if (viewportHeight.enabled)
                {
                    rect.height = viewportHeight.Evaluate(reaktor.Output);
                    rect.y      = (1.0f - rect.height) * 0.5f;
                }
                GetComponent <Camera>().rect = rect;
            }
        }
Beispiel #15
0
        void UpdateLight(float param)
        {
            if (intensity.enabled)
            {
                GetComponent <Light>().intensity = intensity.Evaluate(param);
            }
            if (enableColor)
            {
                MeshRenderer[] renderers = GetComponentsInChildren <MeshRenderer>();

                //LineRenderer[] lines = GetComponentsInChildren<LineRenderer>();
                foreach (MeshRenderer renderer in renderers)
                {
                    Color newcolor = colorGradient.Evaluate(param);


                    renderer.materials[2].SetColor("_EmissionColor", newcolor);
                }
                //{
                //    line.startColor = colorGradient.Evaluate(param);
                //    line.endColor = colorGradient.Evaluate(param);
                //}
            }
        }
Beispiel #16
0
        void Update()
        {
            var o = reaktor.Output;

            if (positionFrequency.enabled)
            {
                jitter.positionFrequency = positionFrequency.Evaluate(o);
            }

            if (rotationFrequency.enabled)
            {
                jitter.rotationFrequency = rotationFrequency.Evaluate(o);
            }

            if (positionAmount.enabled)
            {
                jitter.positionAmount = positionAmount.Evaluate(o);
            }

            if (rotationAmount.enabled)
            {
                jitter.rotationAmount = rotationAmount.Evaluate(o);
            }
        }