void Start()
 {
     u = GetComponent<utils>();
     cntCamara = GetComponent<ControlCamara>();
     cntCamara.modo = "inicioPresentacion";
     prota = GameObject.FindWithTag("prota");
     cntGeneral = prota.GetComponent<controlGeneral>();
     transform.position = new Vector3(prota.transform.position.x, prota.transform.position.y, transform.position.z);
 }
    private void createPlayer()
    {
        Debug.Log("Creating player");
        GameObject jugador = PhotonNetwork.Instantiate(Path.Combine("PhotonPreFabs", "PhotonPlayer"), Vector3.zero, Quaternion.identity);
        GameObject camera  = GameObject.FindWithTag("MainCamera");

        if (camera != null)
        {
            ControlCamara followScript = camera.GetComponent("ControlCamara") as ControlCamara;
            if (followScript != null)
            {
                followScript.target = jugador;
            }
        }

        //GameObject Beerpong = PhotonNetwork.Instantiate("Beerpong", new Vector3(32.5f,0,33.6f), Quaternion.identity);
    }
Ejemplo n.º 3
0
 private void recogerReferencias()
 {
     bateria = GameObject.FindWithTag("bateriaUI");
     protagonista = GameObject.FindWithTag("prota");
     cntGeneral = protagonista.GetComponent<controlGeneral>();
     cntCamara = Camera.main.GetComponent<ControlCamara>();
     camaraPausa = GameObject.Find ("pausa").transform.FindChild("CamaraPausa").gameObject;
     camaraExito = GameObject.Find ("exito").transform.FindChild("CamaraExito").gameObject;
     camaraFracaso = GameObject.Find ("fracaso").transform.FindChild("CamaraFracaso").gameObject;
     fondos = GameObject.Find ("_fondos").transform;
 }
 void Start()
 {
     cntCamara = Camera.main.GetComponent<ControlCamara>();
     u = GetComponent<utils>();
     atlas = transform.parent.FindChild("atlas");
 }