| | |
| | |
|
| | | public int DayBuyCount { get; private set; } // 当日已购买次数
|
| | |
|
| | | public int DayItemAddCount { get; private set; } // 当日物品增加次数
|
| | |
|
| | | private int preDayPkCount;
|
| | | CrossServerOneVsOneModel crossServerModel { get { return ModelCenter.Instance.GetModel<CrossServerOneVsOneModel>(); } }
|
| | | public event Action UpdatePlayerInfoEvent;
|
| | | public event Action UpdateMatchNumEvent;
|
| | |
|
| | | public void InitData()
|
| | | {
|
| | | preDayPkCount = 0;
|
| | | Score = 0;
|
| | | DanLV = 0;
|
| | | PKCount = 0;
|
| | |
| | | this.PKCount = playerInfo.PKCount;
|
| | | this.WinCount = playerInfo.WinCount;
|
| | | this.CWinCount = playerInfo.CWinCount;
|
| | | this.DayPKCount = playerInfo.DayPKCount;
|
| | | this.DayBuyCount = playerInfo.DayBuyCount;
|
| | | this.DayWinCount = playerInfo.DayWinCount;
|
| | | this.DayItemAddCount = playerInfo.DayItemAddCount;
|
| | | this.DayPKCount = playerInfo.DayPKCount;
|
| | |
|
| | | if (this.preDayPkCount != playerInfo.DayPKCount)
|
| | | {
|
| | | this.preDayPkCount = playerInfo.DayPKCount;
|
| | | if (UpdateMatchNumEvent != null)
|
| | | {
|
| | | UpdateMatchNumEvent();
|
| | | }
|
| | | }
|
| | | |
| | | if (UpdatePlayerInfoEvent != null)
|
| | | {
|
| | | UpdatePlayerInfoEvent();
|
| | |
| | |
|
| | | public int GetDayRemainNum()
|
| | | {
|
| | | int remainNum = DayBuyCount + crossServerModel.freeMaxMatchNum - DayPKCount;
|
| | | int remainNum = DayBuyCount + DayItemAddCount + crossServerModel.freeMaxMatchNum - DayPKCount;
|
| | | return remainNum > 0 ? remainNum : 0;
|
| | | }
|
| | |
|