Beispiel #1
0
 public void SwapSegments(SongPlayer controller, AudioClip tempClip, float tempPitch, Material tempMaterial, Color tempColor, Vector3 tempScale, bool tempBool)
 {
     clip             = controller.clip;
     controller.clip  = tempClip;
     pitch            = controller.pitch;
     controller.pitch = tempPitch;
     Song.pitch       = pitch;
     Song.clip        = clip;
     Song.Play();
     indicator.GetComponentInChildren <SkinnedMeshRenderer>().material            = controller.indicator.GetComponentInChildren <SkinnedMeshRenderer>().material;
     pitchIndicator.GetComponent <MeshRenderer>().material                        = controller.indicator.GetComponentInChildren <SkinnedMeshRenderer>().material;
     controller.indicator.GetComponentInChildren <SkinnedMeshRenderer>().material = tempMaterial;
     controller.pitchIndicator.GetComponent <MeshRenderer>().material             = tempMaterial;
     indicator.GetComponentInChildren <Light>().color            = controller.indicator.GetComponentInChildren <Light>().color;
     pitchIndicator.GetComponent <Light>().color                 = controller.indicator.GetComponentInChildren <Light>().color;
     controller.indicator.GetComponentInChildren <Light>().color = tempColor;
     controller.pitchIndicator.GetComponent <Light>().color      = tempColor;
     pitchIndicator.transform.localScale            = controller.pitchIndicator.transform.localScale;
     controller.pitchIndicator.transform.localScale = tempScale;
     correctPitch            = controller.correctPitch;
     controller.correctPitch = tempBool;
     tempBool                     = correctReordering;
     correctReordering            = controller.correctReordering;
     controller.correctReordering = tempBool;
     controller.CheckReordering();
     controller.CheckPitch();
 }
Beispiel #2
0
    public void Update()
    {
        if (!initDone)
        {
            controller1.CheckPitch();
            controller2.CheckPitch();
            controller3.CheckPitch();
            controller4.CheckPitch();
            controller5.CheckPitch();
            controller1.CheckReordering();
            controller2.CheckReordering();
            controller3.CheckReordering();
            controller4.CheckReordering();
            controller5.CheckReordering();
            initDone = true;
        }

        //Debug.Log(""+returnToFullTrack);
        Seg1       = controller1.clip;
        Seg2       = controller2.clip;
        Seg3       = controller3.clip;
        Seg4       = controller4.clip;
        Seg5       = controller5.clip;
        Seg1_pitch = controller1.pitch;
        Seg2_pitch = controller2.pitch;
        Seg3_pitch = controller3.pitch;
        Seg4_pitch = controller4.pitch;
        Seg5_pitch = controller5.pitch;
        if (Song.isPlaying == false && returnToFullTrack == true)
        {
            SelectSegment();
        }
        if ((int)pitchProgress == 5 && (int)reorderingProgress == 5 && _win == false)
        {
            //Debug.Log("WIN");
            winSoundEffect.Play();
            segment = 5;
            _win    = true;
            crazyPup.sentences.SetValue("You did it!", 0);
            crazyPup.sentences.SetValue("Now you can take the Feather of Virtue.", 1);
            crazyPup.sentences.SetValue("Good luck!", 2);
        }
    }