void Awake()
 {
     gen = GetComponent<controlGeneral>();
     animator = GetComponent<Animator>();
     collider = GetComponent<BoxCollider2D>();
     comprobadorPared = transform.FindChild("comprobadorPared");
     cntSonidoSalto = transform.FindChild("Tronco").GetComponent<controlPersonajeSonidoSalto>();
 }
 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);
 }
示例#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 Awake()
 {
     gen = GetComponent<controlGeneral>();
     run = GetComponent<controlRunner>();
     u = GetComponent<utils>();
 }
 void Start()
 {
     gen = GetComponent<controlGeneral>();
     run = GetComponent<controlRunner>();
 }