Exemplo n.º 1
0
 void Update()
 {
     if (followSpline.CurrPoint >= followSpline.splineWindow.spline.Length - 1 && !followSpline.reverse)
     {
         followSpline.CurrPoint--;
         followSpline.StartMoving(followSpline.CurrPoint--, 0, 0, true);
     }
     else if (followSpline.CurrPoint >= followSpline.splineWindow.spline.Length - 1 && followSpline.reverse)
     {
         followSpline.CurrPoint = 1;
         followSpline.StartMoving(followSpline.CurrPoint, 0, 0, false);
     }
 }
Exemplo n.º 2
0
 private void InBetweenFades()
 {
     CoroutineHelper.DelayTime(1f, StartScreenFadeOut);
     if (currentlyInCutscene)
     {
         cutsceneCamera.SetActive(false);
         cutsceneCanvas.SetActive(false);
         airBalloon.SetActive(true);
         gameCutsceneCanvas.SetActive(true);
         LevelManager.Instance.SpawnLevel();
     }
     else
     {
         airBalloon.SetActive(false);
         gameCutsceneCanvas.SetActive(false);
         cutsceneCamera.SetActive(true);
         cutsceneCanvas.SetActive(true);
         for (int i = 0; i < gameOverCanvasObjects.Count; i++)
         {
             gameOverCanvasObjects[i].SetActive(true);
         }
         airBalloon.transform.position = airBalloonStartPosition;
         FollowSpline _followSpline = airBalloon.GetComponent <FollowSpline>();
         //MoveObject _moveObject = airBalloon.GetComponent<MoveObject>();
         //_moveObject.speed = 6f;
         _followSpline.StartMoving(0, 0, 0, false);
         LevelManager.Instance.RemoveLevel();
     }
 }