コード例 #1
0
    void FlareHandling_LowerAndRougher()
    {
        // for LowerAndRougher, event beginnings and proceedings are all handled by a GrownAndFade in this method
        // ( event beginnings are not determined by geyser collisions )
        // growAndFade values are for ampLocal; scale light intensity from that - whereas above its the opposite

        // growAndFade must run constantly
        aud_ampLocal = lowerAndRougher_growAndFade.ReturnCurrentValue(flare_lowerAndRougher_growAndFade_initStayPut, false, mx_flare_lowerAndRougher_growAndFade_targetGrowRange, mx_flare_lowerAndRougher_growAndFade_targetFadeRange, mx_flare_lowerAndRougher_growAndFade_durToGrowRange, mx_flare_lowerAndRougher_growAndFade_durToFadeRange, mx_flare_lowerAndRougher_growAndFade_durToStayGrownRange, mx_flare_lowerAndRougher_growAndFade_durToStayFadedRange);

        // DESIGN prevent CPU overload...
        // only start flare if numBusyFlares is below the max num allowed
        if (lowerAndRougher_growAndFade._fadedAndStayingPutClick == true)
        {
            if (lightDiscs_numBusyFlare_script.lightDiscs_numBusyFlare < mx_flare_lowerAndRougher_maxNumFlares)
            {
                StartLightFlareSwell_LowerAndRougher();
                busyFlare = true;
            }
            else
            {
                // mute poly
                aud_lightFlareEvent_end = true;
                busyFlare = false;
            }
        }

        if (busyFlare == true)
        {
            lightComponent.intensity = Scale(aud_ampLocal, 0f, 1f, lightFlareEvent_intensityRange_lowerAndRougher[0], lightFlareEvent_intensityRange_lowerAndRougher[1]);
        }
    }
コード例 #2
0
    //***********************
    void Void_UpsideDownReveal_OnOff()
    {
        // here's a nice coordination between OnOffTrackerWeighted and GrowAndFade
        // we get the onDur and divide it into the proportions we want for grow, stay, and fade
        void_upsideDownReveal_onOffCn = void_upsideDownReveal_onOffTracker.Return_OnOff_Cn(void_upsideDownReveal_initOn, mx_void_upsideDownReveal_on_shorter_durRange, mx_void_upsideDownReveal_on_longer_durRange, mx_void_upsideDownReveal_prob_onLonger, mx_void_upsideDownReveal_off_shorter_durRange, mx_void_upsideDownReveal_off_longer_durRange, mx_void_upsideDownReveal_prob_offLonger, 1f);
        void_upsideDownReveal_on      = void_upsideDownReveal_onOffCn.on;
        if (void_upsideDownReveal_on == true)
        {
            if (void_upsideDownReveal_onOffCn.onClick == true)
            {
                void_upsideDownReveal_eventOnDur  = void_upsideDownReveal_onOffCn.onDur;
                void_upsideDownReveal_growAndFade = new GrowAndFade();
                // just make sure all adds to 1.
                void_upsideDownReveal_growDur             = void_upsideDownReveal_eventOnDur * .35f;
                void_upsideDownReveal_stayDur             = void_upsideDownReveal_eventOnDur * .15f;
                void_upsideDownReveal_fadeDur             = void_upsideDownReveal_eventOnDur * .5f;
                void_upsideDownReveal_prerecorded_playPos = Random.Range(0, void_upsideDownReveal_prerecorded_brownianBufferDur);
                void_upsideDownReveal_transp = Random.Range(mx_void_upsideDownReveal_transpRange[0], mx_void_upsideDownReveal_transpRange[1]);
            }

            void_upsideDownReveal_ampLocal = void_upsideDownReveal_growAndFade.ReturnCurrentValue(false, false, new Vector2(.7f, 1f), Vector2.one * 0, Vector2.one * void_upsideDownReveal_growDur, Vector2.one * void_upsideDownReveal_fadeDur, Vector2.one * void_upsideDownReveal_stayDur, Vector2.one * 0f);
        }
    }
コード例 #3
0
 void Update()
 {
     // init: grow, don't stay put
     currentValue = growAndFade.ReturnCurrentValue(false, false, targetGrowRange, targetFadeRange, durToGrowRange, durToFadeRange, durToStayGrownRange, durToStayFadedRange);
     Debug.Log(currentValue);
 }
コード例 #4
0
 // run once per frame
 void Update()
 {
     tentacle_height = growAndFade.ReturnCurrentValue(start_hold, start_grow, targetGrow, durToGrow,
                                                      targetFade, durToFade, durToHoldGrown, durToHoldFaded);
 }