遴选 支付修改等
parent
a7c71dcb30
commit
1a120208e3
|
|
@ -32,7 +32,7 @@ namespace GameLogic
|
||||||
string[] kv = ss.Split('#');
|
string[] kv = ss.Split('#');
|
||||||
if (kv[2] == "1")//数字
|
if (kv[2] == "1")//数字
|
||||||
{
|
{
|
||||||
d.Add(kv[0], Convert.ToInt32(kv[1]));
|
d.Add(kv[0], Convert.ToSingle(kv[1]));
|
||||||
}
|
}
|
||||||
else if(kv[2] == "2")//数组
|
else if(kv[2] == "2")//数组
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -10,80 +10,65 @@ namespace SDK
|
||||||
{
|
{
|
||||||
public class iOSProxy : Proxy
|
public class iOSProxy : Proxy
|
||||||
{
|
{
|
||||||
////初始化
|
//初始化
|
||||||
//[DllImport("__Internal")]
|
[DllImport("__Internal")]
|
||||||
//private static extern void m_KTInit(string totalStr);
|
private static extern void m_SDK_Init();
|
||||||
//public override void Init()//SDKInitArgs args)
|
public override void Init()
|
||||||
//{
|
{
|
||||||
// //StringBuilder sb = new StringBuilder();
|
m_SDK_Init();
|
||||||
// //sb.AppendFormat("{0}#{1}", args.appid, args.appkey);
|
}
|
||||||
// //m_KTInit(sb.ToString());
|
|
||||||
//}
|
|
||||||
|
|
||||||
////登录
|
//登录
|
||||||
//[DllImport("__Internal")]
|
[DllImport("__Internal")]
|
||||||
//private static extern void m_KTIogin();
|
private static extern void m_SDK_Login();
|
||||||
//public override void Login()
|
public override void Login()
|
||||||
//{
|
{
|
||||||
// m_KTIogin();
|
m_SDK_Login();
|
||||||
//}
|
}
|
||||||
|
|
||||||
|
//登录
|
||||||
|
[DllImport("__Internal")]
|
||||||
|
private static extern void m_SDK_Logout();
|
||||||
|
public override void Logout()
|
||||||
|
{
|
||||||
|
m_SDK_Logout();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
////退出游戏
|
//退出游戏
|
||||||
//[DllImport("__Internal")]
|
[DllImport("__Internal")]
|
||||||
//private static extern void m_KTExit();
|
private static extern void m_SDK_Exit();
|
||||||
//public override void Exit()
|
public override void Exit()
|
||||||
//{
|
{
|
||||||
// m_KTExit();
|
m_SDK_Exit();
|
||||||
//}
|
}
|
||||||
|
|
||||||
//[DllImport("__Internal")]
|
|
||||||
//private static extern void m_KTPay(string totalStr);
|
|
||||||
//public override void Pay(SDKPayArgs args)
|
|
||||||
//{
|
|
||||||
// StringBuilder sb = new StringBuilder();
|
|
||||||
// sb.AppendFormat("{0}#{1}#{2}#{3}#{4}#{5}#{6}#{7}#{8}#{9}#{10}#{11}#{12}#{13}#{14}",
|
|
||||||
// AppConst.TokenStr,
|
|
||||||
// args.zoneId,
|
|
||||||
// args.serverID,
|
|
||||||
// args.serverName,
|
|
||||||
// args.roleID,
|
|
||||||
// args.roleName,
|
|
||||||
// args.roleLevel,
|
|
||||||
// args.productId,
|
|
||||||
// args.productName,
|
|
||||||
// args.roleID,
|
|
||||||
// "",//extendbox
|
|
||||||
// "",//gateway
|
|
||||||
// AppConst.OpenId,
|
|
||||||
// "",//payext
|
|
||||||
// args.price);
|
|
||||||
// m_KTPay(sb.ToString());
|
|
||||||
//}
|
|
||||||
|
|
||||||
////sdk 获取设备标识
|
//退出游戏
|
||||||
//[DllImport("__Internal")]
|
[DllImport("__Internal")]
|
||||||
//private static extern string m_KTGetDeviceID();
|
private static extern void m_SDK_SubmitExtraData(string areaName, string roleName, string roleGrade);
|
||||||
//public override string GetDeviceID()
|
public override void SubmitExtraData(SDKSubmitExtraDataArgs args)
|
||||||
//{
|
{
|
||||||
// return m_KTGetDeviceID();
|
m_SDK_SubmitExtraData(args.zoneID, args.roleID, args.roleLevel);
|
||||||
//}
|
}
|
||||||
|
|
||||||
////sdk 获取IMEI
|
|
||||||
//[DllImport("__Internal")]
|
|
||||||
//private static extern string m_KTGetIMEICode();
|
|
||||||
//public override string GetIMEICode()
|
|
||||||
//{
|
|
||||||
// return m_KTGetIMEICode();
|
|
||||||
//}
|
|
||||||
|
|
||||||
////sdk获取支付订单号
|
[DllImport("__Internal")]
|
||||||
//[DllImport("__Internal")]
|
private static extern void m_SDK_Pay(string money, string detail, string csId, string csName, string pid);
|
||||||
//private static extern string m_KTGetPayOrderID();
|
public override void Pay(SDKPayArgs args)
|
||||||
//public override string GetPayOrderID()
|
{
|
||||||
//{
|
m_SDK_Pay(args.price.ToString(), args.productDesc, args.productId, args.productName, args.payNotifyUrl);
|
||||||
// return m_KTGetPayOrderID();
|
}
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
|
//sdk获取支付订单号
|
||||||
|
[DllImport("__Internal")]
|
||||||
|
private static extern string m_SDK_CustomEvent(string eventName);
|
||||||
|
public override void CustomEvent(string eventName, string eventDesc)
|
||||||
|
{
|
||||||
|
m_SDK_CustomEvent(eventName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ function this.Pay(context)
|
||||||
payData.Desc = rechargeConfig.Desc
|
payData.Desc = rechargeConfig.Desc
|
||||||
payData.Price = rechargeConfig.Price
|
payData.Price = rechargeConfig.Price
|
||||||
payData.Type = rechargeConfig.Type
|
payData.Type = rechargeConfig.Type
|
||||||
|
payData.RechargeId = rechargeConfig.RechargeId
|
||||||
this.RequestPay(payData)
|
this.RequestPay(payData)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -52,7 +53,7 @@ function this.RequestPay(context)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local params = SDK.SDKPayArgs.New()
|
local params = SDK.SDKPayArgs.New()
|
||||||
params.productId = context.Id
|
params.productId = context.RechargeId
|
||||||
params.productName = context.Name or ""
|
params.productName = context.Name or ""
|
||||||
params.productDesc = context.Desc or ""
|
params.productDesc = context.Desc or ""
|
||||||
params.price = price * 100 -- 以分为单位
|
params.price = price * 100 -- 以分为单位
|
||||||
|
|
@ -71,7 +72,7 @@ function this.RequestPay(context)
|
||||||
params.guildID = PlayerManager.familyId
|
params.guildID = PlayerManager.familyId
|
||||||
-- 其他
|
-- 其他
|
||||||
params.payNotifyUrl = ""
|
params.payNotifyUrl = ""
|
||||||
params.extension = string.format("%s_%s_%s", PlayerManager.uid, context.Id, VersionManager:GetVersionInfo("subChannel"))--tostring(context.Id)
|
params.extension = tostring(context.Id)--string.format("%s_%s_%s", PlayerManager.uid, context.Id, VersionManager:GetVersionInfo("subChannel"))--tostring(context.Id)
|
||||||
--string.format("%s_%s_%s_%s_%s_%s",
|
--string.format("%s_%s_%s_%s_%s_%s",
|
||||||
-- AppConst.OpenId,context.Id,context.Price,PlayerManager.uid,
|
-- AppConst.OpenId,context.Id,context.Price,PlayerManager.uid,
|
||||||
-- PlayerManager.serverInfo.server_id,PlayerManager.serverInfo.name)
|
-- PlayerManager.serverInfo.server_id,PlayerManager.serverInfo.name)
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,32 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ce6d27d9b3afb3b48810eb2bb5b483c3
|
||||||
|
PluginImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
defineConstraints: []
|
||||||
|
isPreloaded: 0
|
||||||
|
isOverridable: 0
|
||||||
|
isExplicitlyReferenced: 0
|
||||||
|
platformData:
|
||||||
|
- first:
|
||||||
|
Any:
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings: {}
|
||||||
|
- first:
|
||||||
|
Editor: Editor
|
||||||
|
second:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
DefaultValueInitialized: true
|
||||||
|
- first:
|
||||||
|
iPhone: iOS
|
||||||
|
second:
|
||||||
|
enabled: 1
|
||||||
|
settings:
|
||||||
|
AddToEmbeddedBinaries: false
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -240,7 +240,26 @@ namespace GameEditor.FrameTool
|
||||||
build2.assetNames = new string[] { ai2.assetPath };
|
build2.assetNames = new string[] { ai2.assetPath };
|
||||||
|
|
||||||
string exportPath = AssetBundleConfig.GetExportPath(EditorUserBuildSettings.activeBuildTarget);
|
string exportPath = AssetBundleConfig.GetExportPath(EditorUserBuildSettings.activeBuildTarget);
|
||||||
BuildPipeline.BuildAssetBundles(exportPath, new AssetBundleBuild[] { build, build2 }, BuildAssetBundleOptions.DeterministicAssetBundle, EditorUserBuildSettings.activeBuildTarget);
|
var manifest = BuildPipeline.BuildAssetBundles(exportPath, new AssetBundleBuild[] { build, build2 }, BuildAssetBundleOptions.DeterministicAssetBundle, EditorUserBuildSettings.activeBuildTarget);
|
||||||
|
|
||||||
|
// 加密 文件前加入128个空字符
|
||||||
|
foreach (var name in manifest.GetAllAssetBundles())
|
||||||
|
{
|
||||||
|
var uniqueSalt = Encoding.UTF8.GetBytes(name);
|
||||||
|
string pn = Path.Combine(exportPath, name);
|
||||||
|
byte[] oldData = File.ReadAllBytes(pn);
|
||||||
|
int len = (int)GameLogic.AppConst.EncyptBytesLength;
|
||||||
|
int newOldLen = len + oldData.Length;//定死了,128个空byte
|
||||||
|
var newData = new byte[newOldLen];
|
||||||
|
for (int tb = 0; tb < oldData.Length; tb++)
|
||||||
|
{
|
||||||
|
newData[len + tb] = oldData[tb];
|
||||||
|
}
|
||||||
|
FileStream fs = File.OpenWrite(pn);//打开写入进去
|
||||||
|
fs.Write(newData, 0, newOldLen);
|
||||||
|
fs.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
CreateCRCFiles(exportPath);
|
CreateCRCFiles(exportPath);
|
||||||
AssetBundleBuilder.ClearManifest(exportPath);
|
AssetBundleBuilder.ClearManifest(exportPath);
|
||||||
|
|
|
||||||
|
|
@ -78,13 +78,13 @@ public class GameStart : MonoBehaviour
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
IEnumerator playMovice()
|
//IEnumerator playMovice()
|
||||||
{
|
//{
|
||||||
Handheld.PlayFullScreenMovie("PV_v5_0521_1.mp4", Color.black, FullScreenMovieControlMode.CancelOnInput);
|
// Handheld.PlayFullScreenMovie("PV_v5_0521_1.mp4", Color.black, FullScreenMovieControlMode.CancelOnInput);
|
||||||
|
|
||||||
yield return new WaitForEndOfFrame();
|
// yield return new WaitForEndOfFrame();
|
||||||
|
|
||||||
App.Instance.Initialize();
|
// App.Instance.Initialize();
|
||||||
UpdateManager.Instance.StartUp();
|
// UpdateManager.Instance.StartUp();
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue