示例#1
0
        private static ShopTriggerObjectives GetTriggerObjectives(Structure[] structures)
        {
            var triggers = new ShopTriggerObjectives();

            foreach (var item in structures)
            {
                triggers.AddTriggerFor(item);
            }

            return(triggers);
        }
示例#2
0
        private static Dictionary <int, ShopBook> GetShopBook(Structure[] structures,
                                                              Dictionary <int, ShopContent[]> shopContents,
                                                              ShopTriggerObjectives triggers)
        {
            var shopBookFactory  = new ShopBookFactory();
            var shopBookOfPlayer = new Dictionary <int, ShopBook>();

            for (int i = 0; i < 8; i++)
            {
                var book = shopBookFactory.GetShopBook(shopContents[i + 1], i + 1, triggers);
                shopBookOfPlayer[i + 1] = book;
            }
            return(shopBookOfPlayer);
        }
 public ShopBook GetShopBook(ShopContent[] contents, int playerId, ShopTriggerObjectives triggers)
 {
     return(new ShopBook(contents, playerId, triggers));
 }