コード例 #1
0
    // Update is called once per frame
    void Update()
    {
        Rayo = Camera.main.ScreenPointToRay(Input.mousePosition);

        if (puntos1 >= 300)
        {
            M2.SetActive(true);
        }

        if (Physics.Raycast(rayo, out choca) && (Input.GetMouseButton(0)))
        {
            if (choca.collider.name == "M1")
            {
                SceneManager.LoadScene(4);
            }
            if (choca.collider.name == "M2")
            {
                SceneManager.LoadScene(5);
            }
        }
    }
コード例 #2
0
    IEnumerator Merit()
    {
        yield return(new WaitForSeconds(Pause * 2));

        M1.SetActive(true);
        yield return(new WaitForSeconds(Pause));

        M2.SetActive(true);
        yield return(new WaitForSeconds(Pause));

        M3.SetActive(true);
        yield return(new WaitForSeconds(Pause));

        M4.SetActive(true);
        yield return(new WaitForSeconds(Pause));

        M5.SetActive(true);
        yield return(new WaitForSeconds(Pause * 2));

        Victory.SetActive(true);
        yield return(new WaitForSeconds(Pause * 2));

        Application.LoadLevel("Credits");
    }
コード例 #3
0
 // Use this for initialization
 void Start()
 {
     M2 = GameObject.FindGameObjectWithTag("M2");
     M2.SetActive(false);
     Puntos1 = GameObject.Find("Punto").GetComponent <Minijuego1>().Nivel1.PuntajeObtenido;
 }