public static RESULT Check(PBConnect_buyShopItem.SHOP_TYPE shopId, REQUEST_TYPE requestType) { if (requestType == REQUEST_TYPE.REFRESH) { Assert.assert(refreshCostType >= 0); if (!Model_Helper.HasEnoughResource(refreshCostType, refreshCostCount)) { return(RESULT.LACK_RESOURCE); } } return(RESULT.OK); }
public static RESULT GetShop(PBConnect_buyShopItem.SHOP_TYPE shopId, PBConnect_getShop.DelegateConnectCallback callback) { REQUEST_TYPE requestType = REQUEST_TYPE.GET; RESULT r = Check(shopId, requestType); if (r != RESULT.OK) { return(r); } GetShopRequest request = new GetShopRequest(); request.api = (new Model_ApiRequest()).api; request.shopId = (int)shopId; request.refresh = (int)requestType; (new PBConnect_getShop()).Send(request, callback); return(r); }
public void Update(PBConnect_buyShopItem.SHOP_TYPE shopType, List <SlgPB.ShopItem> shopItems) { _shopType = shopType; _shopItems = shopItems; }