先修复一下,错误的场景 删除不必要的钓场资产 修复into场景 update:更新meta文件,修复报错 update:修复资源 修复第一章节建造 修复建造第三章 update:删除多余内容 update:更新README.md update:还原图标 update:更新README update:更新配置
75 lines
1.9 KiB
C#
75 lines
1.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using asap.core;
|
|
using cfg;
|
|
using Newtonsoft.Json.Linq;
|
|
|
|
namespace game
|
|
{
|
|
|
|
public class DevIAPService : IIAPService
|
|
{
|
|
|
|
|
|
private IDisposable disposable;
|
|
|
|
public async Task<IList<SKUDetail>> GetSKUs()
|
|
{
|
|
var IAPList = GContext.container.Resolve<Tables>().TbIAPItemList.DataList;
|
|
var result = new List<SKUDetail>();
|
|
foreach (var iap in IAPList)
|
|
{
|
|
result.Add(new SKUDetail
|
|
{
|
|
productId = iap.ProductId1,
|
|
ProdKey = iap.ProductId1,
|
|
ProdID = iap.ProductId1,
|
|
title = iap.ID.ToString(),
|
|
price = $"US${iap.PaymentAmount}",
|
|
ProdPriceStr = $"US${iap.PaymentAmount}",
|
|
ProdPrice = iap.PaymentAmount,
|
|
price_currency_code = "USD",
|
|
localeCurrencySymbol = "$",
|
|
});
|
|
}
|
|
await Awaiters.NextFrame;
|
|
return result;
|
|
}
|
|
|
|
|
|
public async Task<PaymentInfo> Pay(Action<string> OnSuccessFromSdk,string replenishmentDataStr, SKUDetail sku, int count, float usdPrice, JObject extraPurcheInfo)
|
|
{
|
|
await Awaiters.NextFrame;
|
|
return new PaymentInfo() { isSuccess = true, code = "0" };
|
|
}
|
|
|
|
public void Release()
|
|
{
|
|
disposable?.Dispose();
|
|
disposable = null;
|
|
}
|
|
|
|
public void Init()
|
|
{
|
|
|
|
Release();
|
|
|
|
}
|
|
|
|
public async Task<Dictionary<string,string>> GetOrderUnreceived()
|
|
{
|
|
await Awaiters.NextFrame;
|
|
return new Dictionary<string,string>();
|
|
}
|
|
|
|
|
|
|
|
public async Task<bool> ConfirmOrders(List<string> orderIDs)
|
|
{
|
|
await Awaiters.NextFrame;
|
|
return false;
|
|
}
|
|
}
|
|
}
|