示例#1
0
    public virtual void MudarOpcao()
    {
        int quanto = -commandR.ValorDeGatilhos("EscolhaV");

        if (quanto == 0)
        {
            quanto = -commandR.ValorDeGatilhosTeclado("VerticalTeclado");
        }


        MudarOpcaoComVal(quanto);
    }
示例#2
0
    public void LateUpdate()
    {
        switch (estado)
        {
        case EstdoDaqui.selecaoDeItem:
            CommandReader cr = GameController.g.CommandR;

            if (cr.DisparaAcao())
            {
                if (modoOrganizar)
                {
                    AoClique(insereI.OpcaoEscolhida);
                }
                else
                {
                    oSelecionado = insereI.OpcaoEscolhida;
                    BtnUsarItem();
                }
            }
            else if (cr.DisparaCancel())
            {
                BtnVoltar();
            }
            else if (Input.GetButtonDown("trocaCriature"))
            {
                BtnOrganizar();
            }


            int quanto = -insereI.LineCellCount() * cr.ValorDeGatilhos("EscolhaV");

            if (quanto == 0)
            {
                quanto = -insereI.LineCellCount() * cr.ValorDeGatilhosTeclado("VerticalTeclado");
            }

            if (quanto == 0)
            {
                quanto = cr.ValorDeGatilhos("EscolhaH") + cr.ValorDeGatilhos("HorizontalTeclado");
            }

            insereI.MudarOpcaoComVal(quanto, insereI.LineCellCount());

            if (quanto != 0 && meusItens.Length > 0)
            {
                infos.text
                    = BancoDeTextos.RetornaListaDeTextoDoIdioma(ChaveDeTexto.shopInfoItem)
                      [(int)(meusItens[insereI.OpcaoEscolhida].ID)];
            }
            else if (meusItens.Length <= 0)
            {
                infos.text = "";
            }
            break;
        }
    }
    private void Update()
    {
        if (gameObject.activeSelf)
        {
            switch (estado)
            {
                case EstadoDaqui.botoesAtivos:
                    if (Input.GetButtonDown("Cancel"))
                    {
                        BtnVoltar();
                    }
                    else
                        ActionManager.useiCancel = false;
                    int val = commandR.ValorDeGatilhos("EscolhaH");
                    if (val == 0)
                        val = commandR.ValorDeGatilhosTeclado("HorizontalTeclado");

                    if (val == 1)
                        BotaoMaisUm();
                    else if (val == -1)
                        BotaoMenosUm();
                    else
                    {
                        val = commandR.ValorDeGatilhos("EscolhaV");
                        if (val == 0)
                            val = commandR.ValorDeGatilhosTeclado("VerticalTeclado");

                        if (val == 1)
                            BotaoMaisDez();
                        else if (val == -1)
                            BotaoMenosDez();
                    }
                break;
                case EstadoDaqui.fraseAgradecer:
                    if (GameController.g.HudM.DisparaT.LendoMensagemAteOCheia())
                    {
                        ActionManager.ModificarAcao(transform, () => { gameObject.SetActive(false); });
                    }
                break;
            }
        }
    }
示例#4
0
    private void Update()
    {
        if (fase == FasesDaqui.selecionavel)
        {
            int val = commandR.ValorDeGatilhos("EscolhaH");
            if (val == 0)
            {
                val = commandR.ValorDeGatilhosTeclado("HorizontalTeclado");
            }

            if (val != 0)
            {
                btns[opcaoEscolhida].DaSelecao.sprite = GameController.g.El.uiDefault;


                if (val > 0)
                {
                    if (opcaoEscolhida + val < 5)
                    {
                        opcaoEscolhida += val;
                    }
                    else
                    {
                        opcaoEscolhida = 0;
                    }
                }
                else if (val < 0)
                {
                    if (opcaoEscolhida + val >= 0)
                    {
                        opcaoEscolhida += val;
                    }
                    else
                    {
                        opcaoEscolhida = 4;
                    }
                }



                Destacar(opcaoEscolhida);
            }
            else
            if (commandR.DisparaAcao())
            {
                fase = FasesDaqui.painelSuspenso;
                QualGolpeEsquecer(opcaoEscolhida);
            }
        }
    }
    public override void MudarOpcao()
    {
        int quanto = CommandReader.ValorDeGatilhos("VDpad", GameController.g.Manager.Control);

        if (quanto == 0)
        {
            quanto = CommandReader.ValorDeGatilhosTeclado("vertical", GameController.g.Manager.Control);
        }

        bool mudou = quanto != 0;

        int opcaoGuardada = OpcaoEscolhida;

        base.MudarOpcao_H(true);

        if (opcaoGuardada != OpcaoEscolhida || mudou)
        {
            EventAgregator.Publish(new StandardSendGameEvent(EventKey.UiDeEmblemasChange, "encaixes", mudou, OpcaoEscolhida));
        }
    }
示例#6
0
    public override void MudarOpcao()
    {
        int opcaoEscolhidaAnterior = OpcaoEscolhida;

        int quanto = -LineCellCount() * CommandReader.ValorDeGatilhos("VDpad", GameController.g.Manager.Control);

        if (quanto == 0)
        {
            quanto = -LineCellCount() * CommandReader.ValorDeGatilhosTeclado("vertical", GameController.g.Manager.Control);
        }

        if (quanto == 0)
        {
            quanto = CommandReader.ValorDeGatilhos("HDpad", GameController.g.Manager.Control) + CommandReader.ValorDeGatilhos("horizontal", GameController.g.Manager.Control);
        }

        MudarOpcaoComVal(quanto, LineCellCount());

        if (quanto != 0)
        {
            EventAgregator.Publish(new StandardSendGameEvent(EventKey.UiDeEmblemasChange, "disponivel",
                                                             VerificaMudouDepainel(quanto, opcaoEscolhidaAnterior), OpcaoEscolhida));
        }
    }