12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- using System.Collections.Generic;
- namespace GFGGame
- {
- public class BattlePassTaskDataManager : Singleton<BattlePassTaskDataManager>
- {
- //通行证赛季Id
- private int SeasonId = 0;
- //是否购买通行证
- private bool IsBuy = false;
-
-
- //已经领奖levelId
- private HashSet<int> NormalRewards = new HashSet<int>();
- //已经高级领奖levelId
- private HashSet<int> SuperRewards = new HashSet<int>();
-
- public int GetSeasonId()
- {
- return SeasonId;
- }
-
- public void AddNormalReward(int levelId)
- {
- NormalRewards.Add(levelId);
- }
-
- public void AddSuperReward(int levelId)
- {
- SuperRewards.Add(levelId);
- }
-
- public void SetSeasonId(int seasonId)
- {
- SeasonId = seasonId;
- }
-
- public void SetIsBuy(bool isBuy)
- {
- IsBuy = isBuy;
- }
- //检查普通领取状态
- public bool CheckLevelRewardGet(int levelId)
- {
- return NormalRewards.Contains(levelId);
- }
-
- //检查高级领取状态
- public bool CheckSuperLevelRewardGet(int levelId)
- {
- return SuperRewards.Contains(levelId);
- }
- }
- }
|