示例#1
0
 // Update is called once per frame
 void Update()
 {
     if (!dialogOver && (mainAnimator.GetCurrentAnimatorStateInfo(0).IsName("Intermission00_talk") || mainAnimator.GetCurrentAnimatorStateInfo(0).IsName("Intermission01_talk") || mainAnimator.GetCurrentAnimatorStateInfo(0).IsName("Intermission02_talk") || mainAnimator.GetCurrentAnimatorStateInfo(0).IsName("Intermission03_talk")))
     {
         isTalking       = true;
         bubbleText.text = dialog [currentText];
     }
     if (isTalking && !dialogOver && Input.GetButtonDown("Jump"))
     {
         currentText++;
         nextText();
     }
     if (dialogOver)
     {
         if (isEndgame)
         {
             mainAnimator.SetTrigger("endGameWalkAway");
         }
         else
         {
             mainAnimator.SetTrigger("dialogOver");
         }
     }
     if (Input.GetButtonDown("Fire1") || (mainAnimator.GetCurrentAnimatorStateInfo(0).IsName("Intermission00_nextLevel") || mainAnimator.GetCurrentAnimatorStateInfo(0).IsName("Intermission01_nextLevel") || mainAnimator.GetCurrentAnimatorStateInfo(0).IsName("Intermission02_nextLevel") || mainAnimator.GetCurrentAnimatorStateInfo(0).IsName("Intermission03_nextLevel")))
     {
         Application.LoadLevel(nextStage.getNextStage());
     }
 }
示例#2
0
 // Update is called once per frame
 void Update()
 {
     if (hudAnimator.GetCurrentAnimatorStateInfo(0).IsName("GameFinishWin"))
     {
         winner = true;
     }
     if (winner && hudAnimator.GetCurrentAnimatorStateInfo(0).IsName("GameFinishWinWaitScreen") && Input.GetButtonDown("Jump"))
     {
         hudAnimator.SetTrigger("NextStage");
     }
     if (winner && hudAnimator.GetCurrentAnimatorStateInfo(0).IsName("GameFadeOut"))
     {
         //Something to add while the game fades out
     }
     if (hudAnimator.GetCurrentAnimatorStateInfo(0).IsName("GameFinishLoseWaitScreen") && Input.GetButtonDown("Jump"))
     {
         Application.LoadLevel(Application.loadedLevelName);
     }
     if (hudAnimator.GetCurrentAnimatorStateInfo(0).IsName("NextStage"))
     {
         Application.LoadLevel(nextStage.getNextStage());
     }
 }