Ejemplo n.º 1
0
        private static IEnumerable<Achievement> CreateAchievements()
        {
            CreateAchievementTrackerDelegate persistentKillZombieTrackerCreator = (am, ew, achievement) => new PersistentKillZombiesTracker(am, ew, achievement.Name);
            PassiveSkill zombieKillReward = new PassiveSkill("Player shoots faster", passiveStats => passiveStats.FireRateMultiplier += 0.1f);

            Bag<Achievement> achievements = new Bag<Achievement>();

            // "important"
            AchievementHelper.CreatePersistentKillingAchievements(achievements);
            AchievementHelper.CreatePersistentRunningAchievements(achievements);
            AchievementHelper.CreateScoreAchievements(achievements);

            // "kill XXX"
            AchievementHelper.CreateKillInTimeAchievements(achievements);
            AchievementHelper.CreateKillRushersWhileRushingAchievements(achievements);
            AchievementHelper.CreateKillWithInvulnerabilityAchievements(achievements);
            AchievementHelper.CreateKillWithSingleRocketAchievments(achievements);
            AchievementHelper.CreateKillGoldenGoblinsAchievements(achievements);

            // "survive"
            AchievementHelper.CreateSurviveWithoutKillingAchievements(achievements);
            AchievementHelper.CreateSurviveWithoutMovingAchievements(achievements);

            // misc
            AchievementHelper.CreateLivesAtAnyPointOfGameAchievements(achievements);
            AchievementHelper.CreateSpendLaserWithoutKillingAchievements(achievements);

            // golden goblin

            // not in atm
            AchievementHelper.CreateIAPAchievements(achievements);

            return achievements;
        }
Ejemplo n.º 2
0
        public AchievementInfo(CreateAchievementTrackerDelegate createTrackerFunction, PassiveSkill rewardPassiveSkill)
        {
            Ensure.NotNull(rewardPassiveSkill);

            _createTrackerFunction = createTrackerFunction;
            this.RewardPassiveSkill = rewardPassiveSkill;
        }
Ejemplo n.º 3
0
 private static Achievement CreateKillInTimeAchievement(string name, string description, int count, PassiveSkill reward)
 {
     const float Time = 10f;
     return new Achievement(name, description, new BooleanProgression(false))
     {
         Tag = new AchievementInfo((am, ew, a) => new KillZombiesInTimeTracker(am, ew, a.Name, count, Time), reward)
     };
 }