Ejemplo n.º 1
0
    void Handle_InputConfirm(int[] digits)
    {
        bool codePrintSuccess = true;
        //��������
        //�Ƿ���ȷ��
        uint codeInput = 0;

        for (int i = 0; i != 8; ++i)
        {
            codeInput += (uint)(digits[7 - i] * Mathf.Pow(10F, i));
        }

        BackStageSetting bsSetting = GameMain.Singleton.BSSetting;

        uint codeConfirm = HF_CodePrint.GenerateComfirmCode(bsSetting.His_GainTotal.Val, bsSetting.His_GainCurrent.Val
                                                            , bsSetting.Dat_IdLine.Val, (uint)bsSetting.Dat_IdTable.Val, (uint)bsSetting.His_NumCodePrint.Val
                                                            , (uint)GameMain.Singleton.BSSetting.Dat_FormulaCode.Val, (uint)GameMain.GameIdx);
        uint gainIdx        = 0;
        uint gainRatioMulti = 0;

        codePrintSuccess = HF_CodePrint.VerifyPrintCode(codeInput, bsSetting.His_GainTotal.Val
                                                        , bsSetting.His_GainCurrent.Val
                                                        , (uint)bsSetting.Dat_IdTable.Val
                                                        , (uint)bsSetting.His_NumCodePrint.Val
                                                        , codeConfirm
                                                        , ref gainIdx
                                                        , ref gainRatioMulti);

        //��������
        if (codePrintSuccess)
        {
            if (!bsSetting.CodePrintCurrentAction.Val)
            {
                CurrentToTotalGain();//�鵽����
            }
            else//���δ���,ǰ������,����ˮ
            {
                ClearAllData();
            }

            bsSetting.Dat_CodePrintDateTime.Val = System.DateTime.Now.Ticks;
            bsSetting.His_NumCodePrint.Val     += 1;
            //bsSetting.Dat_GainAdjustIdx.SetImmdiately(((int)gainIdx));

            bsSetting.Dat_RemoteDiffucltFactor.SetImmdiately(gainRatioMulti);
        }


        StartCoroutine(_Coro_CodePrintResult(codePrintSuccess, digits));
    }
Ejemplo n.º 2
0
    void UpdateView()
    {
        BackStageSetting bs  = GameMain.Singleton.BSSetting;
        BackstageMain    bsm = BackstageMain.Singleton;

        //������ʾ������
        Text_ViewInfos[0].text = bs.His_GainTotal.Val.ToString() + " " + bsm.Unit_Coin.CurrentText;
        Text_ViewInfos[1].text = bs.His_GainCurrent.Val.ToString() + " " + bsm.Unit_Coin.CurrentText;
        Text_ViewInfos[2].text = bs.Dat_IdTable.Val.ToString();
        Text_ViewInfos[3].text = bs.His_NumCodePrint.Val.ToString() + " " + bsm.Unit_Times.CurrentText;
        Text_ViewInfos[4].text = string.Format("{0:d4}", HF_CodePrint.GenerateComfirmCode(bs.His_GainTotal.Val, bs.His_GainCurrent.Val
                                                                                          , bs.Dat_IdLine.Val, (uint)bs.Dat_IdTable.Val, (uint)bs.His_NumCodePrint.Val, (uint)GameMain.Singleton.BSSetting.Dat_FormulaCode.Val, (uint)GameMain.GameIdx));

        foreach (tk2dTextMesh t in Text_ViewInfos)
        {
            t.Commit();
        }
    }