Esempio n. 1
0
    //----------------------------------------------------------------------------------------------------------------------

    /*
     * METODO QUE SE EJECUTA AL INICIO DE LA EJECUCIÓN PARA REALIZAR REFERENCIAS
     */
    void Awake()
    {
        estadoJugador  = GetComponent <EstadoJugador>();
        gestionPlantas = GameObject.Find("ControladorJuego").GetComponent <GestionPlantas>();
        //Al inicio el bloqueado brazo y salto
        bloqueadoSalto = true;
        bloqueadoBrazo = true;
    }
Esempio n. 2
0
    private Vector2 posPortalInstanciacion; //Posicion del portal de instanciacion del personaje

    //------------------------------------------------------------------------------------------------------------------

    /*
     * METODO QUE SE EJECUTA AL INICIO DE LA EJECUCIÓN PARA REALIZAR REFERENCIAS
     */
    private void Awake()
    {
        //Iniciar variables
        contEnergia         = 0;
        vidaAux             = vida;
        iniciarCargaEnergia = true;

        //Obtener referencias
        pView        = GetComponent <PhotonView>();
        controlJuego = GameObject.Find("ControladorJuego").GetComponent <ControlJuego>();
        //controlJuego.establecerMarcadores();

        gestionPlantas = GameObject.Find("ControladorJuego").GetComponent <GestionPlantas>();

        //Obtener referencia elemento interfaz
        txtEnergia   = controlJuego.getEnergia();
        txtVida      = controlJuego.getVida();
        txtMunicion  = controlJuego.getMunicion();
        iconoEnergia = controlJuego.getIconoEnergia();
    }
Esempio n. 3
0
    //------------------------------------------------------------------------------------------------------------------

    /*
     * METODO QUE SE EJECUTA AL INICIAR EL SCRIPT
     */
    void Start()
    {
        generadorMunicion = GameObject.Find("ControladorJuego").gameObject.GetComponent <GestionMunicion>();
        gestorInterfaz    = GameObject.Find("ControladorJuego").gameObject.GetComponent <GestionInterfaz>();
        gestionPlantas    = GameObject.Find("ControladorJuego").gameObject.GetComponent <GestionPlantas>();
    }