Пример #1
0
    void onClick_Btn_nowgain_Btn(GameObject caster)
    {
        MineDataBase db = GameTableManager.Instance.GetTableItem <MineDataBase>(homeDM.StoneID);

        if (db != null)
        {
            int count    = (int)Math.Ceiling((double)homeDM.MineLeftTime / db.immediatelyGainTime);
            int gainTime = (int)homeDM.MineGainTime;
            if (homeDM.IsMineVIP)
            {
                gainTime = (int)homeDM.VipGainTime;
            }
            IncreaseDataBase idb = GameTableManager.Instance.GetTableItem <IncreaseDataBase>(3, gainTime);
            if (idb != null)
            {
                count = (int)Math.Ceiling(count * idb.increase);
            }
            string tips = DataManager.Manager <TextManager>().GetLocalFormatText(114531, count);
            TipsManager.Instance.ShowTipWindow(TipWindowType.CancelOk, tips, () =>
            {
                if (homeDM.HasEnoughDianJuan(count))
                {
                    stImmediMineHomeUserCmd_CS cmd = new stImmediMineHomeUserCmd_CS();
                    cmd.is_vip = homeDM.IsMineVIP;
                    NetService.Instance.Send(cmd);
                }
                else
                {
                    Log.Error("元宝不足");
                }
            });
        }
    }
Пример #2
0
    public void OnGetMineAtOnce(stImmediMineHomeUserCmd_CS cmd)
    {
        if (cmd.is_vip)
        {
            VipGainTime       = cmd.fast_gain;
            vipHole.cost_time = 0;
        }
        else
        {
            MineGainTime         = cmd.fast_gain;
            normalHole.cost_time = 0;
        }

        MineLeftTime = 0;
        mineState    = HomeMineState.CanGain;
        TipsManager.Instance.ShowTips(DataManager.Manager <TextManager>().GetLocalText(LocalTextType.Local_TXT_Notice_HomeMineCanGain));
        if (mineUI != null)
        {
            mineUI.RefreshUI();
        }
    }
Пример #3
0
 public void OnGetMineAtOnce(stImmediMineHomeUserCmd_CS cmd)
 {
     DataManager.Manager <HomeDataManager>().OnGetMineAtOnce(cmd);
 }