using System.Collections.Generic; namespace GFGGame { public class BattlePassTaskDataManager : Singleton { //通行证赛季Id private int SeasonId = 0; //是否购买通行证 private bool IsBuy = false; //已经领奖levelId private HashSet NormalRewards = new HashSet(); //已经高级领奖levelId private HashSet SuperRewards = new HashSet(); 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); } } }