示例#1
0
    internal void UIelemento(ElementosEnum elemento)
    {
        element1.gameObject.SetActive(false);
        element2.gameObject.SetActive(false);
        element3.gameObject.SetActive(false);
        element4.gameObject.SetActive(false);
        element5.gameObject.SetActive(false);
        element6.gameObject.SetActive(true);

        switch (elemento)
        {
        case ElementosEnum.elemento_1:
            element1.gameObject.SetActive(true);
            break;

        case ElementosEnum.elemento_2:
            element2.gameObject.SetActive(true);
            break;

        case ElementosEnum.elemento_3:
            element3.gameObject.SetActive(true);
            break;

        case ElementosEnum.elemento_4:
            element4.gameObject.SetActive(true);
            break;

        case ElementosEnum.elemento_5:
            element5.gameObject.SetActive(true);
            break;
        }
    }
示例#2
0
        public static Color ColorDeElemento(this ElementosEnum _enum)
        {
            Color color = Color.white;

            switch (_enum)
            {
            case ElementosEnum.elemento_1:
                color = Color.red;
                break;

            case ElementosEnum.elemento_2:
                color = Color.blue;
                break;

            case ElementosEnum.elemento_3:
                color = Color.green;
                break;

            case ElementosEnum.elemento_4:
                color = Color.yellow;
                break;

            case ElementosEnum.elemento_5:
                color = new Color(1, 0.27f, 0);
                break;
            }


            return(color);
        }
示例#3
0
    internal void DescubrirElemento(ElementosEnum elementoadescubrir)
    {
        if (Slider.value <= 0)
        {
            var mensaje = string.Format("Selecciona una cantidad correcta para descubrir un elemento.");
            alertSctipt.ShowAlert(mensaje);
            return;
        }

        var runas = this.runas[elementoadescubrir.GetOrdinal()];

        Runa runa = null;

        for (int i = 0; i < Runa.runasporelemento && runa == null; i++)
        {
            if (!runas[i].discovered)
            {
                runa = runas[i];
            }
        }

        if (runa != null)
        {
            runa.discovered = true;

            var mensaje = string.Format(mensaje_descubrir, Slider.value.ToString(System.Globalization.CultureInfo.InvariantCulture));
            alertSctipt.ShowAlert(mensaje);
        }
        else
        {
            alertSctipt.ShowAlert(mensaje_runas_ok);
        }
    }
    private void SelectMezclar(ElementosEnum parametro)
    {
        run_a_descubir.SetActive(true);
        elemento_a_mezclar = parametro;


        var runas = Go_UIScript._Go_UIScript.Runas(elemento_a_mezclar);

        for (int i = 0; i < runas.Length; i++)
        {
            GameObject aux    = null;
            Button     auxbtn = null;
            switch (i)
            {
            case 0:
                aux    = btn_runa1.gameObject;
                auxbtn = btn_runa1;
                break;

            case 1:
                aux    = btn_runa2.gameObject;;
                auxbtn = btn_runa2;
                break;

            case 2:
                aux    = btn_runa3.gameObject;
                auxbtn = btn_runa3;

                break;

            case 3:
                aux    = btn_runa4.gameObject;
                auxbtn = btn_runa4;
                break;
            }

            if (runas[i].discovered)
            {
                auxbtn.gameObject.SetActive(true);
                var auxim = auxbtn.GetComponent <Image>();
                if (auxim != null)
                {
                    auxim.color = parametro.ColorDeElemento();
                }
            }
            else
            {
                auxbtn.gameObject.SetActive(false);
                var auxim = auxbtn.GetComponent <Image>();
                if (auxim != null)
                {
                    auxim.color = Color.white;
                }
            }
        }
    }
    void SelectDescubrir(ElementosEnum param)
    {
        btn_descubrir.gameObject.SetActive(true);
        elementoadescubrir = param;
        Color color = inital_runa_color;


        runa_descubir.color = elementoadescubrir.ColorDeElemento();

        Go_UIScript._Go_UIScript.UIelemento(elementoadescubrir);
    }
示例#6
0
    internal void ForjarElemento(int index, ElementosEnum elemento_a_forjar)
    {
        // container_forjar.transform.localPosition = Go_UIScript.hide_position;
        // container_forjar_nivel.transform.localPosition = Go_UIScript.screen_position;



        container_forjar_nivel.GetComponent <Container_forjar_nivelScript>().Forja          = forjas[elemento_a_forjar.GetOrdinal()][index];
        container_forjar_nivel.GetComponent <Container_forjar_nivelScript>().Forja.elemento = elemento_a_forjar;
        show_screen(container_forjar_nivel, container_forjar);


        element1.gameObject.SetActive(false);
        element2.gameObject.SetActive(false);
        element3.gameObject.SetActive(false);
        element4.gameObject.SetActive(false);
        element5.gameObject.SetActive(false);
        element6.gameObject.SetActive(true);
        element7.gameObject.SetActive(false);
        switch (elemento_a_forjar)
        {
        case ElementosEnum.elemento_1:
            element1.gameObject.SetActive(true);
            break;

        case ElementosEnum.elemento_2:
            element2.gameObject.SetActive(true);
            break;

        case ElementosEnum.elemento_3:
            element3.gameObject.SetActive(true);
            break;

        case ElementosEnum.elemento_4:
            element4.gameObject.SetActive(true);
            break;

        case ElementosEnum.elemento_5:
            element5.gameObject.SetActive(true);
            break;
        }


        Slider.value = 0;
        Slider.gameObject.SetActive(true);
        // textslider.gameObject.SetActive(tohide == container_options);
        GO_Slider.gameObject.SetActive(true);
        container_forjar_nivel.GetComponent <Container_forjar_nivelScript>().Init();
    }
    private void SelectForjar(ElementosEnum parametro)
    {
        run_a_forjar.SetActive(true);
        elemento_a_forjar = parametro;


        var forjas = Go_UIScript._Go_UIScript.Forjas(elemento_a_forjar);

        for (int i = 0; i < forjas.Length; i++)
        {
            GameObject aux    = null;
            Button     auxbtn = null;
            switch (i)
            {
            case 0:
                aux    = btn_Forja1.gameObject;
                auxbtn = btn_Forja1;
                break;

            case 1:
                aux    = btn_Forja2.gameObject;;
                auxbtn = btn_Forja2;
                break;

            case 2:
                aux    = btn_Forja3.gameObject;
                auxbtn = btn_Forja3;

                break;

            case 3:
                aux    = btn_Forja4.gameObject;
                auxbtn = btn_Forja4;
                break;
            }


            auxbtn.gameObject.SetActive(true);
            var auxim = auxbtn.GetComponent <Image>();
            if (auxim != null)
            {
                auxim.color = elemento_a_forjar.ColorDeElemento();
            }
        }
    }
示例#8
0
    internal void MezclarElemento(int runaindex, ElementosEnum el_mezclar)
    {
        if (Slider.value <= 0)
        {
            var mensaje = string.Format("Selecciona una cantidad correcta para hacer la mezcla.");
            alertSctipt.ShowAlert(mensaje);
            return;
        }

        var runas = this.runas[el_mezclar.GetOrdinal()];

        var runa = runas[runaindex];

        if (runa != null)
        {
            runa.discovered = true;

            var mensaje = string.Format(mensaje_mezclar, runa.Name, Slider.value.ToString(System.Globalization.CultureInfo.InvariantCulture));
            alertSctipt.ShowAlert(mensaje);
        }
    }
示例#9
0
    internal Runa[] Runas(ElementosEnum el_mezclar)
    {
        element1.gameObject.SetActive(false);
        element2.gameObject.SetActive(false);
        element3.gameObject.SetActive(false);
        element4.gameObject.SetActive(false);
        element5.gameObject.SetActive(false);
        element6.gameObject.SetActive(true);
        element7.gameObject.SetActive(true);
        switch (el_mezclar)
        {
        case ElementosEnum.elemento_1:
            element1.gameObject.SetActive(true);
            break;

        case ElementosEnum.elemento_2:
            element2.gameObject.SetActive(true);
            break;

        case ElementosEnum.elemento_3:
            element3.gameObject.SetActive(true);
            break;

        case ElementosEnum.elemento_4:
            element4.gameObject.SetActive(true);
            break;

        case ElementosEnum.elemento_5:
            element5.gameObject.SetActive(true);
            break;
        }

        var runas = this.runas[el_mezclar.GetOrdinal()];

        return(runas);
    }
示例#10
0
    internal Forja[] Forjas(ElementosEnum elemento_a_forjar)
    {
        var forjas = this.forjas[elemento_a_forjar.GetOrdinal()];

        return(forjas);
    }
 public void Init()
 {
     elementoadescubrir = ElementosEnum._none;
     btn_descubrir.gameObject.SetActive(false);
     runa_descubir.color = inital_runa_color;
 }