示例#1
0
 // Update is called once per frame
 void Update()
 {
     if (watched && loading)
     {
         loading.fillAmount += GlobalLoadingSpeed * Time.deltaTime;
         if (loading.fillAmount >= 0.4f && !analyticsEnded)
         {
             analyticsEnded = true;
             AnalyticsMainMenu.End();
         }
         if (loading.fillAmount >= 0.6f && !levelLoaded)
         {
             levelLoaded           = true;
             Global.LoadHoleNumber = LevelNumber;
             Application.LoadLevelAsync("GolfVR");
         }
     }
     else if (loading && loading.fillAmount > 0)
     {
         loading.fillAmount -= GlobalLoadingSpeed;
     }
 }
示例#2
0
 //OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     //Application.LoadLevel("GolfVR");
     AnalyticsMainMenu.End();
     Application.LoadLevelAsync("GolfVR");
 }