コード例 #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");
        }
    }
コード例 #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;
        }
        }
    }
コード例 #3
0
 void Start()
 {
     curState = TackState.tackingIntro;
 }
コード例 #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" );
        }
    }
コード例 #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;
         }
     }
 }
コード例 #6
0
 void Start()
 {
     curState = TackState.tackingIntro;
 }