Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2014
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.25 KB | None | 0 0
  1. private IEnumerator waitForSecondTrigger()
  2.     {
  3.         Time.timeScale = 0f;
  4.        
  5.         float start = Time.realtimeSinceStartup;
  6.         while (Time.realtimeSinceStartup < start + 1f)
  7.             yield return null;
  8.        
  9.         Time.timeScale = 1f;
  10.     }
  11.  
  12.     private IEnumerator waitForRubTutorial()
  13.     {
  14.         Time.timeScale = 0f;
  15.  
  16.         float start = Time.realtimeSinceStartup;
  17.         while (Time.realtimeSinceStartup < start + 2f)
  18.             yield return null;
  19.  
  20.         Time.timeScale = 1f;
  21.     }
  22.    
  23.     private void onPlayerTweenFinishedCallback()
  24.     {
  25.         if( bFourthTutorialTriggerHit == true )
  26.         {
  27.             bFourthTutorialTriggerHit = false;
  28.             mRubMultiplierLabel.SetActive(true);
  29.             StartCoroutine( waitForRubTutorial() );
  30.         }
  31.         else if( bFifthTutorialTriggerHit == true )
  32.         {
  33.             bFourthTutorialTriggerHit = false;
  34.             mTutorialSceneScript.mIsStarted = false;
  35.             StartCoroutine (rubCountdown ());
  36.         }
  37.     }
  38.  
  39.     private IEnumerator rubCountdown()
  40.     {
  41.         mCountdownLabel.SetActive (true);
  42.  
  43.         for (int i = 3; i > 0; i--)
  44.         {
  45.             mCountdownLabel.GetComponent<UILabel>().text = i.ToString();
  46.             yield return new WaitForSeconds(1f);
  47.         }
  48.  
  49.         Finger.SetActive(true);
  50.         Finger.transform.localPosition = new Vector3(0f, -3.590966f, -1f);
  51.         mTutorialSceneScript.mIsStarted = true;
  52.        
  53.         mCountdownLabel.SetActive (false);
  54.  
  55.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement