コード例 #1
0
    public void Start()
    {
        //lb
        LB.SetActive(false);
        LB2.SetActive(false);
        //
        if (PlayerPrefs.HasKey("CoinTotal"))
        {
            PlayerPrefs.SetInt("CoinTotal", PlayerPrefs.GetInt("CoinTotal") + PlayerPrefs.GetInt("CoinRun"));
        }
        else
        {
            PlayerPrefs.SetInt("CoinTotal", PlayerPrefs.GetInt("CoinRun"));
        }
        //   CoinText.text = PlayerPrefs.GetInt("CoinTotal").ToString();

        //Achievement

        //Chillar
        if (PlayerPrefs.GetInt("CoinTotal") > 1000)
        {
            AchievementManager.instance.SetAchievementProgress("CW", 1000);
        }
        else
        {
            AchievementManager.instance.SetAchievementProgress("CW", PlayerPrefs.GetInt("CoinTotal"));
        }
        //Gullak
        if (PlayerPrefs.GetInt("CoinTotal") > 10000)
        {
            AchievementManager.instance.SetAchievementProgress("GW", 10000);
        }
        else
        {
            AchievementManager.instance.SetAchievementProgress("GW", PlayerPrefs.GetInt("CoinTotal"));
        }
        //Bank
        if (PlayerPrefs.GetInt("CoinTotal") > 100000)
        {
            AchievementManager.instance.SetAchievementProgress("BW", 100000);
        }
        else
        {
            AchievementManager.instance.SetAchievementProgress("BW", PlayerPrefs.GetInt("CoinTotal"));
        }
        //Tresure
        if (PlayerPrefs.GetInt("CoinTotal") > 1000000)
        {
            AchievementManager.instance.SetAchievementProgress("T", 1000000);
        }
        else
        {
            AchievementManager.instance.SetAchievementProgress("T", PlayerPrefs.GetInt("CoinTotal"));
        }
        // AchievementManager.instance.SetAchievementProgress("CW", PlayerPrefs.GetInt("CoinTotal"));
        // AchievementManager.instance.SetAchievementProgress("GW", PlayerPrefs.GetInt("CoinTotal"));
        // AchievementManager.instance.SetAchievementProgress("BW", PlayerPrefs.GetInt("CoinTotal"));
        // AchievementManager.instance.SetAchievementProgress("T", PlayerPrefs.GetInt("CoinTotal"));
    }
コード例 #2
0
ファイル: produtos.aspx.cs プロジェクト: Laerton2016/SIME
        private void calcularCustos(Regra regra)
        {
            Double txComissao = 0, alq1, alq2, custo, Vd1, Vd2, Frete, federal1, federal2, ICMSD1, ICMSD2, ICMSC, alICMSC, IPI, LB1, LB2, LL1, LL2, TXFixa1, TXFixa2, comissao1, comissao2;

            custo = Convert.ToDouble(txtCusto.Text.ToString());

            alq1 = Convert.ToDouble(txtaliq1.Text.ToString());
            Vd1  = Convert.ToDouble(txtvalor1.Text.ToString());

            //Fazendo o valor 2 em relação ao desconto.
            Vd2  = (Convert.ToDouble(txtvalor1.Text.ToString()) - ((Convert.ToDouble(txtDesconto.Text.ToString()) / 100) * Convert.ToDouble(txtvalor1.Text.ToString())));
            alq2 = (((Vd2 - custo) * 100) / custo);

            txtvalor2.Text = Vd2.ToString("N");
            txtaliq2.Text  = alq2.ToString("N");

            Frete    = Convert.ToDouble(txtCusto.Text.ToString()) * ((Convert.ToDouble(txtFrete.Text.ToString())) / 100);
            federal1 = Vd1 * (regra.getFederal() / 100);
            federal2 = Vd2 * (regra.getFederal() / 100);
            alICMSC  = Convert.ToDouble(txtIcms.Text.ToString());
            IPI      = custo * (Convert.ToDouble(txtIPI.Text.ToString()) / 100);
            LB1      = custo * (alq1 / 100);
            LB2      = custo * (alq2 / 100);
            TXFixa1  = Vd1 * (regra.getTaxaDespesasFixas() / 100);
            TXFixa2  = Vd2 * (regra.getTaxaDespesasFixas() / 100);
            ICMSC    = custo * ((18 - alICMSC) / 100); // Mudar quando não usar mais aliquotas negativas para ICMSC
            //Deve-se prepara a regra para Normal e SuperSimples, neste caso só apresentarei o superSimples
            ICMSD1     = 0;
            ICMSD2     = 0;
            txComissao = (txtComissao.Text.Equals("")) ? 0 : (Convert.ToDouble(txtComissao.Text) / 100);
            comissao1  = txComissao * Vd1;
            comissao2  = txComissao * Vd2;

            LL1 = Vd1 - (custo + Frete + federal1 + IPI + ICMSC + ICMSD1 + TXFixa1 + comissao1);
            LL2 = Vd2 - (custo + Frete + federal2 + IPI + ICMSC + ICMSD2 + TXFixa2 + comissao2);

            Labfrete1.Text    = Frete.ToString("N");
            Labfrete2.Text    = Frete.ToString("N");
            LabICMS0.Text     = (ICMSC + ICMSD1).ToString("N");
            LabICMS1.Text     = (ICMSC + ICMSD2).ToString("N");
            LabFederal1.Text  = federal1.ToString("N");
            LabFederal2.Text  = federal2.ToString("N");
            LabIPI1.Text      = IPI.ToString("N");
            LabIPI2.Text      = IPI.ToString("N");
            LabLB1.Text       = LB1.ToString("N");
            LabLB2.Text       = LB2.ToString("N");
            LabFixa1.Text     = TXFixa1.ToString("N");
            LabFixa2.Text     = TXFixa2.ToString("N");
            LabLL1.Text       = (LL1 < 0)? "<font color ='red'>" + LL1.ToString("N") + "</font>" : LL1.ToString("N");
            LabLL2.Text       = (LL2 < 0) ? "<font color ='red'>" + LL2.ToString("N") + "</font>" : LL2.ToString("N");
            labComissao1.Text = comissao1.ToString("N");
            labComissao2.Text = comissao2.ToString("N");
        }
コード例 #3
0
    public void cutLBpanel()
    {
        LBpanel.SetActive(false);
        LB.SetActive(false);
        LB2.SetActive(false);

        AchievementButton.SetActive(true);
        DailyRewardButton.SetActive(true);
        ShopButton.SetActive(true);
        LeaderBoardButton.SetActive(true);
        SoundButton.SetActive(true);
        CreditButton.SetActive(true);

        MenuP.SetActive(true);
        CoinP.SetActive(true);
        HighCoinP.SetActive(true);
        SoundManagerMainMenu.instance.ButtonSoundPlay();
    }
コード例 #4
0
    public void LBbuttonClicked()
    {
        LBpanel.SetActive(true);
        LB.SetActive(true);
        LB2.SetActive(true);

        AchievementButton.SetActive(false);
        DailyRewardButton.SetActive(false);
        ShopButton.SetActive(false);
        LeaderBoardButton.SetActive(false);
        SoundButton.SetActive(false);
        CreditButton.SetActive(false);

        MenuP.SetActive(false);
        CoinP.SetActive(false);
        HighCoinP.SetActive(false);
        SoundManagerMainMenu.instance.ButtonSoundPlay();
        ADManager.instance.DisplayInterstitialAfterSomeTime();
        ADManager.instance.DisplayRewardedAfterSomeTime();
    }