Example #1
0
 private Tuple<Decimal, Decimal> GetTrackerValues()
 {
   if (!this._achievement.HasTracker)
     return Tuple.Create<Decimal, Decimal>(new Decimal(0), new Decimal(0));
   IAchievementTracker tracker = this._achievement.GetTracker();
   if (tracker.GetTrackerType() == TrackerType.Int)
   {
     AchievementTracker<int> achievementTracker = (AchievementTracker<int>) tracker;
     return Tuple.Create<Decimal, Decimal>((Decimal) achievementTracker.Value, (Decimal) achievementTracker.MaxValue);
   }
   if (tracker.GetTrackerType() != TrackerType.Float)
     return Tuple.Create<Decimal, Decimal>(new Decimal(0), new Decimal(0));
   AchievementTracker<float> achievementTracker1 = (AchievementTracker<float>) tracker;
   return Tuple.Create<Decimal, Decimal>((Decimal) achievementTracker1.Value, (Decimal) achievementTracker1.MaxValue);
 }
Example #2
0
        private Tuple <decimal, decimal> GetTrackerValues()
        {
            if (!_achievement.HasTracker)
            {
                return(Tuple.Create(0m, 0m));
            }
            IAchievementTracker tracker = _achievement.GetTracker();

            if (tracker.GetTrackerType() == TrackerType.Int)
            {
                AchievementTracker <int> achievementTracker = (AchievementTracker <int>)tracker;
                return(Tuple.Create((decimal)achievementTracker.Value, (decimal)achievementTracker.MaxValue));
            }
            if (tracker.GetTrackerType() == TrackerType.Float)
            {
                AchievementTracker <float> achievementTracker2 = (AchievementTracker <float>)tracker;
                return(Tuple.Create((decimal)achievementTracker2.Value, (decimal)achievementTracker2.MaxValue));
            }
            return(Tuple.Create(0m, 0m));
        }