Beispiel #1
0
 public static void LevelComplete()
 {
     foreach (var player in Globals.GameState.Players.Where(p => p.IsPlaying))
     {
         var gold = TotalLevelGold(player);
         player.Zerd.Stats.GoldEarned += gold;
         player.Gold            += gold;
         AbilityUpgrades[player] = AbilityUpgradeHelper.GetRandomUpgrades();
     }
     CurrentLevel++;
 }
Beispiel #2
0
 public static void Initialize(List <Player> players)
 {
     _levelHasEnded  = false;
     CurrentLevel    = 1;
     AbilityUpgrades = new Dictionary <Player, Tuple <AbilityUpgrade, AbilityUpgrade, AbilityUpgrade> >
     {
         { players[0], new Tuple <AbilityUpgrade, AbilityUpgrade, AbilityUpgrade>(null, null, null) },
         { players[1], new Tuple <AbilityUpgrade, AbilityUpgrade, AbilityUpgrade>(null, null, null) },
         { players[2], new Tuple <AbilityUpgrade, AbilityUpgrade, AbilityUpgrade>(null, null, null) },
         { players[3], new Tuple <AbilityUpgrade, AbilityUpgrade, AbilityUpgrade>(null, null, null) }
     };
     players.ForEach(p =>
     {
         AbilityUpgrades[p] = AbilityUpgradeHelper.GetRandomUpgrades();
     });
 }