public LvCollection(int tlevel, List <LvItem[]> tLevelReward, List <int[]> tReward, LevelRewardCollection.CollectionState tCollectionState) { this.level = tlevel; tLvReward = tLevelReward; reward = tReward; CollectionState = tCollectionState; }
public void SetItemValue(object obj) { colItem = obj as CollectionItem; if (colItem != null) { giftId = colItem.ID; num = colItem.num; curItemState = colItem.giftType; } GetObject(giftId); Refresh(); }
public LevelRewardCollection.CollectionState RefreshItemState(int num, int tLimit) { List <int> levelRewardList = Core.Data.ActivityManager.GetGotLvReward(); LevelRewardCollection.CollectionState curItemState = LevelRewardCollection.CollectionState.LockReward; if (levelRewardList != null && levelRewardList.Count != 0) //领过奖励 { if (num < tLimit) //解锁 可以领 { if (levelRewardList.Contains((num + 1) * 5)) { curItemState = LevelRewardCollection.CollectionState.GotReward; } else { curItemState = LevelRewardCollection.CollectionState.UnlockReward; } } else { curItemState = LevelRewardCollection.CollectionState.LockReward; } } else { // 从未领过 可以开启 if (num < tLimit) { curItemState = LevelRewardCollection.CollectionState.UnlockReward; } else { curItemState = LevelRewardCollection.CollectionState.LockReward; } } return(curItemState); }
public CollectionItem(int tId, int tNum, LevelRewardCollection.CollectionState tGiftType) { ID = tId; num = tNum; giftType = tGiftType; }