示例#1
0
    void Start()
    {
        // find scripts
        sampleInfo_JSONParsed       = GameObject.Find("loadJSON_fromMax").GetComponent <LoadJSON_FromMax>().sampleInfo_JSONParsed;
        globalEvolution_script      = GameObject.Find("globalEvolution").GetComponent <GlobalEvolution>();
        oscOutScript                = GameObject.Find("osc").GetComponent <OscOut>();
        cameraExplorerParent_script = GameObject.Find("camera_explorer_parent").GetComponent <CameraExplorerParent_Movement>();
        voidsAllInfo_script         = GameObject.Find("voidsAllInfo").GetComponent <VoidsAllInfo>();

        // init new() shit
        mixer = new Mixer();
        void_static_onOffCn                = new OnOff_Cn();
        void_static_onOffTracker           = new OnOffTracker();
        void_upsideDownReveal_onOffCn      = new OnOff_Cn();
        void_upsideDownReveal_onOffTracker = new OnOffTrackerWeighted();

        // evolution and mixer
        globalEvolutionState = GlobalEvolution.GlobalEvolutionState.begin;
        EvolutionParams();
        MixerValues_Init();

        // get the methods goin'
        New_Qbit_Qtype1_Transposition();
        New_Qbit_Brownian_State();

        // init Prevs

        // json data
        void_upsideDownReveal_prerecorded_brownianBufferDur = sampleInfo_JSONParsed["upsideDownReveal/1/duration"];

        // start over for Methods()
        start = false;
    }
示例#2
0
    void Start()
    {
        oscOutScript       = GameObject.Find("osc").GetComponent <OscOut>();
        lightComponent     = GetComponent <Light>();
        rigidbodyComponent = GetComponent <Rigidbody>();

        makeDiscsModel_script          = GameObject.Find("makeDiscsModel").GetComponent <MakeDiscsModel>();
        globalEvolution_script         = GameObject.Find("globalEvolution").GetComponent <GlobalEvolution>();
        lightDiscs_numBusyFlare_script = GameObject.Find("lightDiscs_numBusyFlare").GetComponent <LightDiscs_NumBusyFlare>();

        mixer = new Mixer();
        MixerValues_Init();
    }
示例#3
0
    void Start()
    {
        skybox = RenderSettings.skybox;

        oscOut_script          = GameObject.Find("osc").GetComponent <OscOut>();
        globalEvolution_script = GameObject.Find("globalEvolution").GetComponent <GlobalEvolution>();

        mixer = new Mixer();
        MixerValues_Init();
        skybox.SetFloat("_Exposure", 0);
        fade = true;

        New_SofterFade();
        New_StayPut();
        ReportOscStart();
    }
示例#4
0
    void Start()
    {
        instantiateLightDiscs_script = GameObject.Find("instantiateLightDiscs").GetComponent <InstantiateLightDiscs>();
        numDiscs = instantiateLightDiscs_script.gridX * instantiateLightDiscs_script.gridZ;

        globalEvolution_script = GameObject.Find("globalEvolution").GetComponent <GlobalEvolution>();
        oscIn_script           = GameObject.Find("osc").GetComponent <OscIn>();
        oscIn_script.MapDouble("/discsModel/funds_lowest", OscIn_setFundsLowest);

        scoreDiscs = new ScoreDiscs();
        scoreDiscs.CurrentHarmonyParams(globalEvolutionState, harmonyLookupIndex);   // <-- this line of code for initialization, else currentState_numHarmonies is 0 at init with divide by 0 errors
        makeNewModel = true;

        mixer = new Mixer();
        MixerValues_Init();
    }
示例#5
0
    void Start()
    {
        voidMeshScript  = GetComponent <VoidMesh>();
        particleSystem1 = GetComponent <ParticleSystem>();
        shapeModule     = particleSystem1.shape;
        mainModule      = particleSystem1.main;
        emissionModule  = particleSystem1.emission;
        rendererModule  = GetComponent <ParticleSystemRenderer>();

        self_id = voidMeshScript.self_id;

        globalEvolution_script = GameObject.Find("globalEvolution").GetComponent <GlobalEvolution>();
        voidsAllInfo_script    = GameObject.Find("voidsAllInfo").GetComponent <VoidsAllInfo>();

        oscOutScript = GameObject.Find("osc").GetComponent <OscOut>();

        mixer = new Mixer();
        MixerValues_Init();
    }
 void Start()
 {
     globalEvolution_script = GameObject.Find("globalEvolution").GetComponent <GlobalEvolution>();
 }
示例#7
0
    void Start()
    {
        oscOutScript          = GameObject.Find("osc").GetComponent <OscOut>();
        sampleInfo_JSONParsed = GameObject.Find("loadJSON_fromMax").GetComponent <LoadJSON_FromMax>().sampleInfo_JSONParsed;

        floor          = GameObject.Find("floor");
        floorY         = floor.transform.position.y;
        floorMin       = floor.GetComponent <Renderer>().bounds.min;
        floorMax       = floor.GetComponent <Renderer>().bounds.max;
        self_height    = GetComponent <Renderer>().bounds.size.y;
        self_material  = GetComponent <Renderer>().material;
        self_rigidbody = GetComponent <Rigidbody>();

        lifeOnFloorDuration = UnityEngine.Random.Range(4.0f, 11.0f);
        fading_duration     = (1 - fading_beginsAtPercentFloorDuration) * lifeOnFloorDuration;
        voidsAllInfo_script = GameObject.Find("voidsAllInfo").GetComponent <VoidsAllInfo>();

        globalEvolution_script = GameObject.Find("globalEvolution").GetComponent <GlobalEvolution>();
        globalEvolutionState   = GlobalEvolution.GlobalEvolutionState.begin;
        mixer = new Mixer();
        MixerValues_Init();
        EvolutionParams();

        self_voidIgniterType_randomWeighted = UnityEngine.Random.Range(0f, 1f);
        self_colorSaturated = self_material.color;

        // the IgniterType is determined here...the VoidMesh writes my igniterType to VoidAllInfo if I am inside the VoidMesh
        if (self_voidIgniterType_randomWeighted < qbitIgniter_threshold)
        {
            self_voidIgniterType = Void_Cn.HitByVoidIgniterType.staticAndQbit;
            //self_colorSaturated = new Color( .051f, .511f, .953f, 1f );
            qbitIgniterFlicker_startTime   = Time.time;
            qbitIgniterFlicker_startColor  = self_colorSaturated;
            self_colorFadedFlicker         = new Color(self_colorSaturated.r, self_colorSaturated.g, self_colorSaturated.b, 0.8f);
            qbitIgniterFlicker_targetColor = self_colorFadedFlicker;
            this.transform.localScale      = new Vector3(.3f, this.transform.localScale.y, .3f);
        }
        else if (self_voidIgniterType_randomWeighted >= qbitIgniter_threshold)
        {
            self_voidIgniterType = Void_Cn.HitByVoidIgniterType.staticOnly;
        }

        self_colorFadedCompletely = new Color(self_colorSaturated.r, self_colorSaturated.g, self_colorSaturated.b, 0.0f);
        self_material.color       = self_colorSaturated;

        aud_GO_born                = true;
        aud_falling_begin          = true;
        aud_falling_bufferStartDur = UnityEngine.Random.Range(0f, sampleInfo_JSONParsed["igniterFalling/1/duration"]);
        aud_curving_casetopRolly_bufferStartDur = UnityEngine.Random.Range(0f, sampleInfo_JSONParsed["igniterCurving/1/duration"]);
        aud_curving_figure8s_1_bufferStartDur   = UnityEngine.Random.Range(0f, sampleInfo_JSONParsed["igniterCurving/2/duration"]);
        aud_curving_figure8s_2_bufferStartDur   = UnityEngine.Random.Range(0f, sampleInfo_JSONParsed["igniterCurving/3/duration"]);
        aud_falling_globalAmp = UnityEngine.Random.Range(falling_ampGlobalRange[0], falling_ampGlobalRange[1]);
        float curving_globalAmp = UnityEngine.Random.Range(curving_ampGlobalRange[0], curving_ampGlobalRange[1]);

        aud_curving_casetopRolly_globalAmp = curving_globalAmp;
        aud_curving_figure8s_1_globalAmp   = curving_globalAmp;
        aud_curving_figure8s_2_globalAmp   = curving_globalAmp;
        destroyWhileFalling_random         = UnityEngine.Random.Range(0f, 1f);
        // Debug.Log("prob " + destroyWhileFalling_prob + " value " + destroyWhileFalling_random);
        if (destroyWhileFalling_random <= destroyWhileFalling_prob)
        {
            destroyWhileFalling = true;
            destroyWhileFalling_fallingStartTime = Time.time;
            destroyWhileFalling_durTilFade       = UnityEngine.Random.Range(destroyWhileFalling_durTilFadeRange[0], destroyWhileFalling_durTilFadeRange[1]);
            // Debug.Log(destroyWhileFalling_durTilFade);
        }

        New_FallingTranspRange();
        New_Curving_figure8s_1_TranspRange();
        New_Curving_figure8s_2_TranspRange();
        InstantiateOscLists();
        ReportOscStart();
    }