| | |
| | | return isEnough;
|
| | | }
|
| | |
|
| | | public static bool CheckCurrencyCount(int moneyType, long needCount, bool needTips = false)
|
| | | /// <param name="needTips">0 不响应 1 弹提示 2 弹获取途径tips</param>
|
| | | public static bool CheckCurrencyCount(int moneyType, long needCount, int needTips = 0)
|
| | | {
|
| | | if (needCount <= 0)
|
| | | {
|
| | |
| | |
|
| | | bool isEnough = haveCount >= needCount;
|
| | |
|
| | | if (!isEnough && needTips)
|
| | | if (!isEnough)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("LackMoney", moneyType);
|
| | | if (needTips == 1)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("LackMoney", moneyType);
|
| | | }
|
| | | else if (needTips == 2)
|
| | | {
|
| | | ItemTipUtility.ShowMoneyTip(moneyType);
|
| | | }
|
| | | }
|
| | |
|
| | | return isEnough;
|