Ejemplo n.º 1
0
 public RewardPack(RewardBaseType baseType, RewardBase rewardBase, RewardColor rewardColor)
 {
     this.BaseType    = baseType;
     this.RewardBase  = rewardBase;
     this.RewardColor = rewardColor;
     this.unlockData  = null; // Null = locked
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Selects the actual reward to show on Antura
        /// </summary>
        public void SelectRewardColorItem(RewardBase _rewardBase, RewardColor _rewardColor)
        {
            var currentSelectedReward = GetRewardPackByPartsIds(_rewardBase.ID, _rewardColor.ID);

            if (OnRewardSelectionChanged != null)
            {
                OnRewardSelectionChanged(currentSelectedReward);
            }

            // Makes sure to set everything pack with that color as seen
            foreach (var pack in GetUnlockedRewardPacksForBase(_rewardBase))
            {
                pack.SetNew(false);
            }
            SaveRewardsUnlockDataChanges();
        }
Ejemplo n.º 3
0
        public MaterialPair GetMaterialPair()
        {
            if (!(RewardBase is RewardProp))
            {
                throw new Exception("Trying to get a material pair for a non-prop pack");
            }

            RewardProp  prop  = RewardBase as RewardProp;
            RewardColor color = RewardColor;

            if (color == null || prop == null)
            {
                return(new MaterialPair());
            }
            MaterialPair mp = new MaterialPair(color.Color1Name, prop.Material1, color.Color2Name, prop.Material2);

            return(mp);
        }
Ejemplo n.º 4
0
 private bool IsRewardColorNew(RewardBase rewardBase, RewardColor rewardColor)
 {
     return(GetUnlockedRewardPacks().Any(r => r.BaseId == rewardBase.ID && r.ColorId == rewardColor.ID && r.IsNew));
 }