コード例 #1
0
 private void RewardPlayer(Tier tier)
 {
     Getters.GetRandomAmmo(tier).AddToInventory(player);
     player.Gold      += 750 * (int)tier;
     player.MaxHealth += 50;
     player.Heal(player.MaxHealth);
     player.Defence += 15;
 }
コード例 #2
0
        private ShopItems GetRandomStuff(Tier tier)
        {
            ShopItems items = new ShopItems();

            AddBonuses(items, Getters.GetDrop(tier).Keys.ToList());
            AddScraps(items, tier);
            items.Backpack.Add(Getters.GetRandomAmmo(tier));
            return(items);
        }
コード例 #3
0
        private void SetDropForLevel(Tier tier, Difficulty diff)
        {
            Dictionary <IBonus, int> set = new Dictionary <IBonus, int>();

            foreach (var pair in Getters.GetDrop(tier))
            {
                set.Add(pair.Key, pair.Value * (int)diff);
            }
            foreach (var pair in Getters.GetScrapDrop(tier))
            {
                set.Add(pair.Key, pair.Value * (int)diff);
            }
            set.Add(new GoldCoin(new Vector(), tier, diff), 33 * (int)diff);
            lvl.SetDroppables(set);
        }
コード例 #4
0
ファイル: Getters.cs プロジェクト: Tobraef/Lost-Boy
 public static List <IEquipable> ParseLoot(IEnumerable <string> loots)
 {
     return(loots
            .Select(name => Getters.ParseItem(name))
            .ToList());
 }