Esempio n. 1
0
    IEnumerator WinReset()
    {
        CameraOverhead();
        yield return(new WaitForSeconds(3f));

        if (setup2.activeSelf == false)
        {
            setup2.SetActive(true);
            setup1.SetActive(false);
            playerBoat.transform.position = setup2transform.position;
            playerBoat.transform.rotation = setup2transform.rotation;
            NavBoatControl.s_instance.respawnTransform = setup2transform;
            // UI
            gameplayUI.SetActive(false);
            jibingInformationUI.SetActive(true);
            playerBoat.GetComponent <Rigidbody>().isKinematic = true;
            curState = TackState.jibingIntro;

//			yield return new WaitForSeconds (2f);
//			CameraMain ();
//			switchToGamePlay = true;
        }
        else
        {
            curState = TackState.win;

            CongratulationsPopUp.s_instance.InitializeCongratulationsPanel("Tacking and Jibing");
        }
    }
Esempio n. 2
0
    void Update()
    {
        switch (curState)
        {
        case TackState.tackingIntro:
        case TackState.jibingIntro:
        {
            if (switchToGamePlay)
            {
                playerBoat.GetComponent <Rigidbody> ().isKinematic = false;
                switchToGamePlay = false;
                curState         = TackState.gameplay;
            }
            break;
        }

        case TackState.gameplay:
        {
            if (switchToReset)
            {
                switchToReset = false;
                curState      = TackState.reset;
            }
            break;
        }

        case TackState.reset:
        {
            //				StartCoroutine ("PauseBoats");
            if (switchToGamePlay)
            {
                switchToGamePlay = false;
                curState         = TackState.gameplay;
                DieOnHitBoat[] arrows = GameObject.FindObjectsOfType <DieOnHitBoat> ();
                foreach (DieOnHitBoat x in arrows)
                {
                    x.Reset();
                }
            }
            break;
        }
        }
    }
Esempio n. 3
0
 void Start()
 {
     curState = TackState.tackingIntro;
 }
Esempio n. 4
0
    IEnumerator WinReset()
    {
        CameraOverhead ();
        yield return new WaitForSeconds (3f);
        if (setup2.activeSelf == false) {
            setup2.SetActive (true);
            setup1.SetActive (false);
            playerBoat.transform.position = setup2transform.position;
            playerBoat.transform.rotation = setup2transform.rotation;
            NavBoatControl.s_instance.respawnTransform = setup2transform;
            // UI
            gameplayUI.SetActive( false );
            jibingInformationUI.SetActive( true );
            playerBoat.GetComponent<Rigidbody>().isKinematic = true;
            curState = TackState.jibingIntro;

        //			yield return new WaitForSeconds (2f);
        //			CameraMain ();
        //			switchToGamePlay = true;
        } else {
            curState = TackState.win;

            CongratulationsPopUp.s_instance.InitializeCongratulationsPanel( "Tacking and Jibing" );
        }
    }
Esempio n. 5
0
 void Update()
 {
     switch (curState) {
     case TackState.tackingIntro:
     case TackState.jibingIntro:
         {
             if (switchToGamePlay) {
                 playerBoat.GetComponent<Rigidbody> ().isKinematic = false;
                 switchToGamePlay = false;
                 curState = TackState.gameplay;
             }
             break;
         }
     case TackState.gameplay:
         {
             if (switchToReset) {
                 switchToReset = false;
                 curState = TackState.reset;
             }
             break;
         }
     case TackState.reset:
         {
             //				StartCoroutine ("PauseBoats");
             if (switchToGamePlay) {
                 switchToGamePlay = false;
                 curState = TackState.gameplay;
                 DieOnHitBoat[] arrows = GameObject.FindObjectsOfType<DieOnHitBoat> ();
                 foreach (DieOnHitBoat x in arrows) {
                     x.Reset ();
                 }
             }
             break;
         }
     }
 }
Esempio n. 6
0
 void Start()
 {
     curState = TackState.tackingIntro;
 }