Exemplo n.º 1
0
 public void cerraPaneles()
 {
     GeneralInfoObj.SetActive(false);
     CrewildInfoObj.SetActive(false);
     AttackObj.SetActive(false);
     PosturesObj.SetActive(false);
     breedingObj.SetActive(false);
 }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        LibreriaS = GameObject.Find("Game Manager/").GetComponent <libreriaDeScrips>();

        CrewillInstancia = new CrewildBase[6];
        int Auxlevel = 10;

        CrewillInstancia[0] = new Beslin(Auxlevel);
        CrewillInstancia[2] = new  crear_Crewild_Grismon_Insecto_Energia(Auxlevel);

        /*     CrewillInstancia[3] = new Kanget(Auxlevel);
         *   CrewillInstancia[4] = new Beslin(Auxlevel);
         *   CrewillInstancia[5] = new Retolizar(Auxlevel);*/


        //  barras de estaminas
        //  CrewillInstancia[0].EstadosCrewild = EstadosEnum.Paralize;
        //  CrewillInstancia[1].EstadosCrewild = EstadosEnum.poison;
        //  CrewillInstancia[0].EstadosCrewild = EstadosEnum.Paralize;
        //  CrewillInstancia[0].Hp = CrewillInstancia[0].hpTotal / 2;

        BarraHp = GameObject.Find("informacion/estadisticas/NameBox/Hp").GetComponent <Scrollbar>();
        HpInfo  = GameObject.Find("informacion/estadisticas/NameBox/Hp/text").GetComponent <Text>();

        BarraExp = GameObject.Find("informacion/estadisticas/NameBox/Exp").GetComponent <Scrollbar>();
        SigNvl   = GameObject.Find("informacion/estadisticas/NameBox/Exp/sig Nvl").GetComponent <Text>();



        GeneralInfoObj = GameObject.Find("informacion/estadisticas/GeneralInfo");
        CrewildInfoObj = GameObject.Find("informacion/estadisticas/CrewildInfo");
        AttackObj      = GameObject.Find("informacion/estadisticas/Attack");
        PosturesObj    = GameObject.Find("informacion/estadisticas/Postures");
        breedingObj    = GameObject.Find("informacion/estadisticas/Breeding");

        //-------- panles Statick info -----------

        NameCrewild = GameObject.Find("informacion/estadisticas/NameBox/NameCrewild").GetComponent <Text>();
        Nivel       = GameObject.Find("informacion/estadisticas/NameBox/NivelCriatura").GetComponent <Text>();



        //-------- panles general info -----------

        Crewild = GameObject.Find("informacion/estadisticas/GeneralInfo/nombreDatos/Crewild").GetComponent <Text>();
        Nombre  = GameObject.Find("informacion/estadisticas/GeneralInfo/nombreDatos/Nombre").GetComponent <Text>();
        Tipo    = GameObject.Find("informacion/estadisticas/GeneralInfo/nombreDatos/Tipo").GetComponent <Text>();


        Estado     = GameObject.Find("informacion/estadisticas/GeneralInfo/estadosEfecto/Estados/Estado/Texto").GetComponent <Text>();
        estadoImag = GameObject.Find("informacion/estadisticas/GeneralInfo/estadosEfecto/Estados/Estado").GetComponent <Image>();

        Efecto      = GameObject.Find("informacion/estadisticas/GeneralInfo/estadosEfecto/Efectos").GetComponent <Text>();
        Descripcion = GameObject.Find("informacion/estadisticas/GeneralInfo/estadosEfecto/Descripcion").GetComponent <Text>();


        Tipos[0] = GameObject.Find("informacion/estadisticas/GeneralInfo/nombreDatos/Tipos 1/Texto").GetComponent <Text>();
        Tipos[1] = GameObject.Find("informacion/estadisticas/GeneralInfo/nombreDatos/Tipos 2/Texto").GetComponent <Text>();

        imagesTipos[0] = GameObject.Find("informacion/estadisticas/GeneralInfo/nombreDatos/Tipos 1").GetComponent <Image>();
        imagesTipos[1] = GameObject.Find("informacion/estadisticas/GeneralInfo/nombreDatos/Tipos 2").GetComponent <Image>();

        RectfTipo2 = GameObject.Find("informacion/estadisticas/GeneralInfo/nombreDatos/Tipos 2").GetComponent <RectTransform>();


        //-------- panel CrewildInfo info -----------

        ataque     = GameObject.Find("informacion/estadisticas/CrewildInfo/estadisticas/Ataque").GetComponent <Text>();
        Defence    = GameObject.Find("informacion/estadisticas/CrewildInfo/estadisticas/Defensa").GetComponent <Text>();
        Evation    = GameObject.Find("informacion/estadisticas/CrewildInfo/estadisticas/Velocidad").GetComponent <Text>();
        Speed      = GameObject.Find("informacion/estadisticas/CrewildInfo/estadisticas/Evacion").GetComponent <Text>();
        AtaClass   = GameObject.Find("informacion/estadisticas/CrewildInfo/estadisticas/AtaClass").GetComponent <Text>();
        DefClass   = GameObject.Find("informacion/estadisticas/CrewildInfo/estadisticas/DefClass").GetComponent <Text>();
        Resistence = GameObject.Find("informacion/estadisticas/CrewildInfo/estadisticas/Resistence").GetComponent <Text>();


        //---------- panel Attacks info ---------------

        for (int i = 0; i < 4; i++)
        {
            AtaqueText[i] = GameObject.Find("informacion/estadisticas/Attack/Movimientos/Attack" + (i + 1)).GetComponent <Text>();
        }

        DescripcionAtaque = GameObject.Find("informacion/estadisticas/Attack/Descripcion/text").GetComponent <Text>();



        //---------- panel Postures info ---------------

        Postures1 = GameObject.Find("informacion/estadisticas/Postures/movimientos/Postura1").GetComponent <Text>();
        Postures2 = GameObject.Find("informacion/estadisticas/Postures/movimientos/Postura2").GetComponent <Text>();
        Postures3 = GameObject.Find("informacion/estadisticas/Postures/movimientos/Postura3").GetComponent <Text>();
        Postures4 = GameObject.Find("informacion/estadisticas/Postures/movimientos/Postura4").GetComponent <Text>();


        //---------- panel crianza info ---------------

        HambreBarra  = GameObject.Find("informacion/estadisticas/Breeding/estados/Hambre").GetComponent <Scrollbar>();
        SueñoBarra   = GameObject.Find("informacion/estadisticas/Breeding/estados/Sueño").GetComponent <Scrollbar>();
        EmpatiaBarra = GameObject.Find("informacion/estadisticas/Breeding/estados/Empatia").GetComponent <Scrollbar>();
        CorduraBarra = GameObject.Find("informacion/estadisticas/Breeding/estados/Cordura").GetComponent <Scrollbar>();

        HambreText  = GameObject.Find("informacion/estadisticas/Breeding/estados/Hambre/text").GetComponent <Text>();
        SueñoText   = GameObject.Find("informacion/estadisticas/Breeding/estados/Sueño/text").GetComponent <Text>();
        EmpatiaText = GameObject.Find("informacion/estadisticas/Breeding/estados/Empatia/text").GetComponent <Text>();
        CorduraText = GameObject.Find("informacion/estadisticas/Breeding/estados/Cordura/text").GetComponent <Text>();

        //---------- panel breeding info ---------------

        TipePanel = GameObject.Find("informacion/estadisticas/panelType/textMenus").GetComponent <Text>();


        //foto de criatura
        imagenCriatura = GameObject.Find("informacion/estadisticas/foto criatura/imagenCrewild").GetComponent <Image>();


        //botones

        botones           = GameObject.Find("informacion/Boton").GetComponent <Image>();
        botones.enabled   = false;
        RectfPanelAtaques = GameObject.Find("informacion/Selector").GetComponent <RectTransform>();
        RectfPanelAtaques.GetComponent <Image>().enabled = false;
        // global text

        GeneralInfoObj.SetActive(true);
        CrewildInfoObj.SetActive(false);
        AttackObj.SetActive(false);
        PosturesObj.SetActive(false);
        breedingObj.SetActive(false);


        if (CargueDatos == false)
        {
            Invoke("InvokeCargar", 0.1f);
            CargueDatos = true;
        }

        EfectoFueraDeBatalla.verificador();
    }
Exemplo n.º 3
0
    void  Accion()
    {
        if (ActivaNavegacion == false)
        {
            SelectPos();
            selectCrewild();
        }

        if (ActivaNavegacion == true && Input.GetKeyDown(KeyCode.Space) ||
            ActivaNavegacion == true && Input.GetKeyDown(KeyCode.C)

            )
        {
            Invoke("retroceder", 0.2f);
        }

        if (posPanel == 1)
        {
            TipePanel.text   = "Info";
            ValidatorBool[0] = true;
            GeneralInfoObj.SetActive(true);
            botones.enabled = false;
        }
        else if (posPanel == 2)
        {
            TipePanel.text   = "Estadisticas";
            ValidatorBool[1] = true;
            CrewildInfoObj.SetActive(true);
            botones.enabled = false;
        }

        else if (posPanel == 3)
        {
            TipePanel.text   = "Ataques";
            ValidatorBool[2] = true;
            AttackObj.SetActive(true);
            botones.enabled = true;
            if (Input.GetKeyDown(KeyCode.Space) && ActivaNavegacion == false)
            {
                ActivaNavegacion = true;
            }
            else if (ActivaNavegacion == true)
            {
                NavAtaques();
            }
        }
        else if (posPanel == 4)
        {
            TipePanel.text   = "Posturas";
            ValidatorBool[3] = true;
            PosturesObj.SetActive(true);
            botones.enabled = false;
        }
        else if (posPanel == 5)
        {
            TipePanel.text   = "Crianza";
            ValidatorBool[4] = true;
            breedingObj.SetActive(true);
            botones.enabled = true;

            /*   if (Input.GetKeyDown(KeyCode.Space) && ActivaNavegacion == false)
             *     ActivaNavegacion = true;
             * else if (ActivaNavegacion == true)
             *     NavAtaques();*/
        }


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

        if (posPanel != 1 && ValidatorBool[0] == true)
        {
            GeneralInfoObj.SetActive(false);
            ValidatorBool[0] = false;
        }


        else if (posPanel != 2 && ValidatorBool[1] == true)
        {
            CrewildInfoObj.SetActive(false);
            ValidatorBool[1] = false;
        }



        else if (posPanel != 3 && ValidatorBool[2] == true)
        {
            AttackObj.SetActive(false);
            ValidatorBool[2] = false;
        }

        else if (posPanel != 4 && ValidatorBool[3] == true)
        {
            PosturesObj.SetActive(false);
            ValidatorBool[3] = false;
        }

        else if (posPanel != 5 && ValidatorBool[4] == true)
        {
            breedingObj.SetActive(false);
            ValidatorBool[4] = false;
        }
    }
Exemplo n.º 4
0
    void Secuencias(CrewildBase crewild)
    {
        if (ActivaNavegacion == true && Input.GetKeyDown(KeyCode.Space) ||
            ActivaNavegacion == true && Input.GetKeyDown(KeyCode.C)

            )
        {
            Invoke("retroceder", 0.2f);
        }

        if (cierraPaneles == true)
        {
            cerraPaneles();
            cierraPaneles = false;
        }

        if (posPanel == 1)
        {
            TipePanel.text = "Info";
            GeneralInfoObj.SetActive(true);
            botones.enabled = false;
        }
        else if (posPanel == 2)
        {
            TipePanel.text = "Estadisticas";
            CrewildInfoObj.SetActive(true);
            botones.enabled = false;
        }

        else if (posPanel == 3)
        {
            TipePanel.text = "Ataques";
            AttackObj.SetActive(true);
            botones.enabled = true;
            if (Input.GetKeyDown(KeyCode.Space) && ActivaNavegacion == false)
            {
                ActivaNavegacion = true;
            }
            else if (ActivaNavegacion == true)
            {
                NavAtaques(crewild);
            }
        }
        else if (posPanel == 4)
        {
            TipePanel.text = "Posturas";
            PosturesObj.SetActive(true);
            botones.enabled = false;
        }
        else if (posPanel == 5)
        {
            TipePanel.text = "Crianza";
            breedingObj.SetActive(true);
            botones.enabled = false;

            /*   if (Input.GetKeyDown(KeyCode.Space) && ActivaNavegacion == false)
             *     ActivaNavegacion = true;
             * else if (ActivaNavegacion == true)
             *     NavAtaques(); */
        }
    }