Ejemplo n.º 1
0
 public void TransistionToSoloMusic(float transitionTime)
 {
     musicSolo.TransitionTo(transitionTime);
 }
Ejemplo n.º 2
0
 public void StartMenuMusic()
 {
     menuSource.Stop();
     menuSource.Play();
     inMenu.TransitionTo(m_TransitionIn);
 }
Ejemplo n.º 3
0
    // Update is called once per frame
    void Update()
    {
        //GetSpectrumAudioSource();


        Player.position   = Vector3.Lerp(Player.position, new Vector3(-0.4591381f, 2.035491f, -0.7840782f), Time.deltaTime);
        Opponent.position = Vector3.Lerp(Opponent.position, new Vector3(-0.137f, 2.035491f, -0.419f), Time.deltaTime);
        Opponent.rotation = Quaternion.Lerp(Opponent.rotation, oppTarget.rotation, Time.deltaTime);
        secondsCount     += Time.deltaTime;
        //var axis = WaveVR_Controller.Input(device).GetAxis(WVR_InputId.WVR_InputId_Alias1_Touchpad);

        if (secondsCount >= 2.01)
        {
            for (int i = 0; i <= danceLights.Length - 1; i++)
            {
                if (i == lightsCounter)
                {
                    danceLights[i].enabled = true;
                }
                else
                {
                    danceLights[i].enabled = false;
                }
            }

            if (lightsCounter + 1 >= danceLights.Length)
            {
                lightsCounter = 0;
            }
            else
            {
                lightsCounter++;
            }

            secondsCount = 0;
        }

        switch (secCounter)
        {
        case 0:
            animator.SetBool("isDanceStart", true);
            dkAnim.SetBool("isDanceStart", true);
            break;

        case 1:
            //dkAnim.SetBool("Turn1", true);
            StartCoroutine(turnComments(ui.opponentComments, "My Turn!", "Show me what ya got!"));
            break;

        case 2:
            //dkAnim.SetBool("Turn1", false);
            isTurn = true;
            //ui.danceInstructions.SetActive(true);
            StartCoroutine(turnComments(ui.playerComments, "Here we go!", "Step it up!"));
            break;

        case 3:
            //dkAnim.SetBool("Turn2", true);
            isTurn = false;
            //ui.danceInstructions.SetActive(false);
            StartCoroutine(turnComments(ui.opponentComments, "Not bad!", "Back at ya!"));
            pointLcount = 0;
            pointRcount = 0;
            shakeLcount = 0;
            shakeRcount = 0;
            break;

        case 4:
            //dkAnim.SetBool("Turn2", false);
            isTurn = true;
            //ui.danceInstructions.SetActive(true);
            StartCoroutine(turnComments(ui.playerComments, "Groovy!", "Almost got it!"));
            break;

        case 5:
            isTurn = false;
            //ui.danceInstructions.SetActive(false);
            pointLcount = 0;
            pointRcount = 0;
            shakeLcount = 0;
            shakeRcount = 0;
            break;

        default:
            break;
        }

        if (isTurn)
        {
            /*if (WaveVR_Controller.Input(device).GetTouchDown(WVR_InputId.WVR_InputId_Alias1_Touchpad))
             * {
             *  if (axis.y >= 0.7 && axis.y <= 1.0)
             *  {
             *      log.text += " top";
             *      previousTouchState = "rShake";
             *  }
             *  if (axis.y <= -0.7 && axis.y >= -1.0)
             *  {
             *      previousTouchState = "lShake";
             *  }
             *  if (axis.x >= 0.7 && axis.x <= 1.0)
             *  {
             *      previousTouchState = "lPoint";
             *  }
             *  if (axis.x <= -0.7 && axis.x >= -1.0)
             *  {
             *      previousTouchState = "rPoint";
             *  }
             *  if (WaveVR_Controller.Input(device).GetPress(WVR_InputId.WVR_InputId_Alias1_Digital_Trigger))
             *  {
             *      if (axis.y >= 0.7 && axis.y <= 1.0)
             *      {
             *          log.text += " top";
             *          previousTouchState = "splits";
             *      }
             *      if (axis.y <= -0.7 && axis.y >= -1.0)
             *      {
             *          previousTouchState = "victory";
             *      }
             *  }
             * }
             *
             * if (WaveVR_Controller.Input(device).GetTouchUp(WVR_InputId.WVR_InputId_Alias1_Touchpad))
             * {
             *  log.text = "Up";
             *  if (axis.y <= -0.7 && axis.y >= -1.0)
             *  {
             *      if (previousTouchState == "splits")
             *      {
             *          animator.SetBool("isSplits", true);
             *          splitsCount++;
             *          battleScore += gm.MoveScore("finishMove", splitsCount);
             *          StartCoroutine(setAnimToFalse("isSplits"));
             *      }
             *      if (previousTouchState == "rShake")
             *      {
             *          animator.SetBool("isShakeR", true);
             *          shakeRcount++;
             *          battleScore += gm.MoveScore("basicMove", shakeRcount);
             *          StartCoroutine(setAnimToFalse("isShakeR"));
             *      }
             *  }
             *  if (axis.y >= 0.7 && axis.y <= 1.0)
             *  {
             *      if (previousTouchState == "victory")
             *      {
             *          animator.SetBool("isVictory", true);
             *          victoryCount++;
             *          battleScore += gm.MoveScore("finishMove", victoryCount);
             *          StartCoroutine(setAnimToFalse("isVictory"));
             *      }
             *      if (previousTouchState == "lShake")
             *      {
             *          animator.SetBool("isShakeL", true);
             *          shakeLcount++;
             *          battleScore += gm.MoveScore("basicMove", shakeLcount);
             *          StartCoroutine(setAnimToFalse("isShakeL"));
             *      }
             *  }
             *  if (axis.x <= -0.7 && axis.x >= -1.0)
             *  {
             *      if (previousTouchState == "lPoint")
             *      {
             *          animator.SetBool("isPointL", true);
             *          pointLcount++;
             *          battleScore += gm.MoveScore("basicMove", pointLcount);
             *          StartCoroutine(setAnimToFalse("isPointL"));
             *      }
             *  }
             *  if (axis.x >= 0.7 && axis.x <= 1.0)
             *  {
             *      if (previousTouchState == "rPoint")
             *      {
             *          animator.SetBool("isPointR", true);
             *          pointRcount++;
             *          battleScore += gm.MoveScore("basicMove", pointRcount);
             *          StartCoroutine(setAnimToFalse("isPointR"));
             *      }
             *  }
             * }
             * if (Input.GetKeyDown(KeyCode.Q))
             * {
             *  pointLcount++;
             *  battleScore += gm.MoveScore("basicMove", pointLcount);
             *  animator.SetBool("isPointL", true);
             * }
             * if (Input.GetKeyUp(KeyCode.Q))
             * {
             *  animator.SetBool("isPointL", false);
             * }
             * if (Input.GetKeyDown(KeyCode.W))
             * {
             *  pointRcount++;
             *  battleScore += gm.MoveScore("basicMove", pointRcount);
             *  animator.SetBool("isPointR", true);
             * }
             * if (Input.GetKeyUp(KeyCode.W))
             * {
             *  animator.SetBool("isPointR", false);
             * }
             * if (Input.GetKeyDown(KeyCode.A))
             * {
             *  shakeLcount++;
             *  battleScore += gm.MoveScore("basicMove", shakeLcount);
             *  animator.SetBool("isShakeL", true);
             * }
             * if (Input.GetKeyUp(KeyCode.A))
             * {
             *  animator.SetBool("isShakeL", false);
             * }
             * if (Input.GetKeyDown(KeyCode.S))
             * {
             *  shakeRcount++;
             *  battleScore += gm.MoveScore("basicMove", shakeRcount);
             *  animator.SetBool("isShakeR", true);
             * }
             * if (Input.GetKeyUp(KeyCode.S))
             * {
             *  animator.SetBool("isShakeR", false);
             * }
             * if (Input.GetKeyDown(KeyCode.E))
             * {
             *  victoryCount++;
             *  battleScore += gm.MoveScore("finishMove", victoryCount);
             *  animator.SetBool("isVictory", true);
             * }
             * if (Input.GetKeyUp(KeyCode.E))
             * {
             *  animator.SetBool("isVictory", false);
             * }
             * if (Input.GetKeyDown(KeyCode.D))
             * {
             *  splitsCount++;
             *  battleScore += gm.MoveScore("finishMove", splitsCount);
             *  animator.SetBool("isSplits", true);
             * }
             * if (Input.GetKeyUp(KeyCode.D))
             * {
             *  animator.SetBool("isSplits", false);
             * }*/
        }
        Debug.Log(isBeat);
        if (isBeat)
        {
            if (OVRInput.Get(OVRInput.Button.PrimaryIndexTrigger) || OVRInput.Get(OVRInput.Button.SecondaryIndexTrigger))
            {
                if (OVRInput.GetDown(OVRInput.Button.One))
                {
                    splitsCount++;
                    battleScore += gm.MoveScore("finishMove", splitsCount);
                    animator.SetBool("isSplits", true);
                    StartCoroutine(setAnimToFalse("isSplits"));
                }
                else if (OVRInput.GetDown(OVRInput.Button.Two))
                {
                    victoryCount++;
                    battleScore += gm.MoveScore("finishMove", victoryCount);
                    animator.SetBool("isVictory", true);
                    StartCoroutine(setAnimToFalse("isVictory"));
                }
            }

            else if (OVRInput.GetDown(OVRInput.Button.One))
            {
                pointRcount++;
                battleScore += gm.MoveScore("basicMove", pointRcount);
                SetAnim("isPointR", "isShakeL", "isShakeR", "isPointL", animator);
            }
            else if (OVRInput.GetDown(OVRInput.Button.Two))
            {
                pointLcount++;
                battleScore += gm.MoveScore("basicMove", pointLcount);
                SetAnim("isPointL", "isShakeL", "isPointR", "isShakeR", animator);
            }
            else if (OVRInput.GetDown(OVRInput.Button.Three))
            {
                shakeLcount++;
                battleScore += gm.MoveScore("basicMove", shakeLcount);
                SetAnim("isShakeL", "isShakeR", "isPointR", "isPointL", animator);
            }
            else if (OVRInput.GetDown(OVRInput.Button.Four))
            {
                shakeRcount++;
                battleScore += gm.MoveScore("basicMove", shakeRcount);
                SetAnim("isShakeR", "isShakeL", "isPointR", "isPointL", animator);
            }

            if (isBeat != isPreviousBeat)
            {
                Debug.Log("enemyBeat");
                bool success = Random.value > 0.5f;
                if (success)
                {
                    int move = Mathf.RoundToInt(Random.Range(0, 3));
                    if (move == 0)
                    {
                        SetAnim(danceSet[move], danceSet[move + 1], danceSet[move + 2], danceSet[move + 3], dkAnim);
                    }
                    else if (move == 1)
                    {
                        SetAnim(danceSet[move], danceSet[move - 1], danceSet[move + 1], danceSet[move + 2], dkAnim);
                    }
                    else if (move == 2)
                    {
                        SetAnim(danceSet[move], danceSet[move + 1], danceSet[move - 2], danceSet[move - 1], dkAnim);
                    }
                    else if (move == 3)
                    {
                        SetAnim(danceSet[move], danceSet[move - 1], danceSet[move - 2], danceSet[move - 3], dkAnim);
                    }
                    opBattleScore += MoveScore();
                }
            }
        }


        ui.playerDanceScore.text = battleScore.ToString();

        ui.opponentDanceScore.text = opBattleScore.ToString();;


        if (!audio.isPlaying)
        {
            foreach (Light light in danceLights)
            {
                light.enabled = false;
            }
            pm.enabled = true;

            barSnapshot.TransitionTo(1.0f);
            animator.SetBool("isDanceStart", false);
            dkAnim.SetBool("isDanceStart", false);
            ui.playerDanceScore.text   = string.Empty;
            ui.opponentDanceScore.text = string.Empty;

            //battleScore += gm.theThreadz;

            /*if (battleScore > opBattleScore)
             * {
             *  ui.win.enabled = true;
             *  ui.winText.text = "You beat the Dance King!";
             *  gm.StartCoroutine(gm.winTimer());
             * }
             * else if (battleScore < opBattleScore)
             * {
             *  ui.win.enabled = true;
             *  ui.winText.text = "Better luck next time!";
             *  gm.StartCoroutine(gm.winTimer());
             * }*/
            plot.SetActive(false);
            gameObject.AddComponent <DanceBattle>().enabled = false;
            ui.startDance.SetActive(true);
            ui.songCanvas.SetActive(true);
            Destroy(this);
        }

        isPreviousBeat = isBeat;
    }
Ejemplo n.º 4
0
 // UnityAction
 public void ClosePause()
 {
     startingSnapshot.TransitionTo(.01f);
 }
Ejemplo n.º 5
0
 private void ChangeSnapshot()
 {
     overkillSnapshot.TransitionTo(20f);
 }
Ejemplo n.º 6
0
 void StopSnapAud()
 {
     stopSnap.TransitionTo(0.5f);
 }
Ejemplo n.º 7
0
 public void UnpauseAudio()
 {
     unpaused.TransitionTo(.01f);
 }
Ejemplo n.º 8
0
 public void TriggerSupportSnapshot()
 {
     supportSnapshot.TransitionTo(snapshotTransitionTime);
 }
Ejemplo n.º 9
0
 public void TriggerAttackSnapshot()
 {
     attackSnapshot.TransitionTo(snapshotTransitionTime);
 }
Ejemplo n.º 10
0
 // Use this for initialization
 void Start()
 {
     notmuffled.TransitionTo(0.1f);
     isExplosion = false;
 }
Ejemplo n.º 11
0
 // Use this for initialization
 void Start()
 {
     StageStart.TransitionTo(0F);
 }
 // Start is called before the first frame update
 void Start()
 {
     GetComponent <AudioSource>().Stop();
     dry.TransitionTo(0.2f);
 }
Ejemplo n.º 13
0
 void OnTriggerEnter()
 {
     mySnapshot.TransitionTo(fadeTime);
 }
Ejemplo n.º 14
0
 public void TransitionToTownInterior()
 {
     townInterior.TransitionTo(0.25f);
     currentSnapShot = townInterior;
 }
Ejemplo n.º 15
0
    private Vignette vignette; //The post processing effect you want to change

    void Start()
    {
        endGameSnapshot.TransitionTo(3f);
        volume = postProcessingObject.GetComponent <Volume>()?.profile;
        StartCoroutine(StartEndGame());
    }
Ejemplo n.º 16
0
 public void TriggerDefenseSnapshot()
 {
     defenseSnapshot.TransitionTo(snapshotTransitionTime);
 }
Ejemplo n.º 17
0
 void NormalSnapAud()
 {
     normalSnap.TransitionTo(0.5f);
 }
Ejemplo n.º 18
0
 public void TriggerMenuSnapshot()
 {
     menuSnapshot.TransitionTo(0f);
 }
Ejemplo n.º 19
0
 public void PauseAudio()
 {
     paused.TransitionTo(.01f);
 }
Ejemplo n.º 20
0
 public void TriggerDefaultSnapshot()
 {
     defaultSnapshot.TransitionTo(0f);
 }
Ejemplo n.º 21
0
 // UnityAction
 public void PauseSnapshotWork()
 {
     pausedSnapshot.TransitionTo(.01f);
 }
 public void EndLevelMusic()
 {
     silenceMusicSnapshot.TransitionTo(2f);
 }
Ejemplo n.º 23
0
 //Call this function to fade the volume to silence over the length of fadeTime
 public void FadeDown(float fadeTime)
 {
     //call the TransitionTo function of the audioMixerSnapshot volumeDown;
     volumeDown.TransitionTo(fadeTime);
 }
 void Start()
 {
     snapshotInside.TransitionTo(0);
     transitionWeight = 1;
 }
Ejemplo n.º 25
0
 void OnTriggerEnter2D(Collider2D other)
 {
     snapshot.TransitionTo(crossFade);
 }
Ejemplo n.º 26
0
 public void StopAudio(float duration)
 {
     fadeOut.TransitionTo(duration);
 }
Ejemplo n.º 27
0
 public void EndGameMusic()
 {
     inGameStarted.TransitionTo(m_TransitionOut);
 }
Ejemplo n.º 28
0
 private void Start()
 {
     unPaused.TransitionTo(.01f);
 }
Ejemplo n.º 29
0
 /// <summary>
 /// Change actual snapshot to another and transition to it in specified time.
 /// </summary>
 /// <param name="_SnapShotName"></param>
 /// <param name="_TransitionDuration"></param>
 public void GoToSnapshot(string _SnapShotName, float _TransitionDuration)
 {
     actualSnapshot = mainMixer.FindSnapshot(_SnapShotName);
     actualSnapshot.TransitionTo(_TransitionDuration);
 }
Ejemplo n.º 30
0
// AMBIENT
    // Snapshot Transitions
    public void TransitionToFaddedOut(float fadeTime)
    {
        fadedOutAll.TransitionTo(fadeTime);
    }