fix:1、删除上一个sdk,更换新的。2、删除了max广告

This commit is contained in:
2026-05-27 09:28:34 +08:00
parent 978797b678
commit 69c818e992
1039 changed files with 99687 additions and 94871 deletions
+231
View File
@@ -0,0 +1,231 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Newtonsoft.Json;
using ASMhQ45fSDK;
using UnityEngine;
using UnityEngine.UI;
using Random = UnityEngine.Random;
public class ASMhQ45fSDKDemo : MonoBehaviour
{
public void ShowReward()
{
ASMhQ45fSDKUTILITY.Instance.ShowRewardVideo("TAG", b =>
{
Debug.LogError($"reward result = {b}");
},(() =>
{
Debug.LogError($"reward close!!!");
}));
}
public void ShowInter()
{
ASMhQ45fSDKUTILITY.Instance.ShowInter("TAG", () =>
{
Debug.LogError("inter hide");
});
}
public void ShowAdmobInter()
{
ASMhQ45fSDKUTILITY.Instance.ShowAdmobInter("TAG", () =>
{
Debug.LogError("inter hide");
});
}
public void ShowSplash()
{
ASMhQ45fSDKUTILITY.Instance.ShowSplash();
}
public void CheckReward(Image btnImg)
{
var isReady = ASMhQ45fSDKUTILITY.Instance.IsVideoReady();
btnImg.color = isReady ? Color.green : Color.white;
Debug.Log($"Reward : {isReady}");
}
public void CheckInter(Image btnImg)
{
var isReady = ASMhQ45fSDKUTILITY.Instance.IsInterReady();
btnImg.color = isReady ? Color.green : Color.white;
Debug.Log($"Inter : {isReady}");
}
public void CheckSplash(Image btnImg)
{
var isReady = ASMhQ45fSDKUTILITY.Instance.IsSplashReady();
btnImg.color = isReady ? Color.green : Color.white;
Debug.Log($"Splash : {isReady}");
}
public void Track()
{
ASMhQ45fSDKUTILITY.Instance.Track("test", new Dictionary<string, string>()
{
{"evt1", "1"},
{"evt2", "2"},
{"evt3", "3"},
{"evt4", "4"},
{"evt5", "5"},
{"evt6", "6"},
{"evt7", "7"},
{"evt8", "8"},
{"evt9", "9"},
});
}
public void GetCountryCode()
{
var code = ASMhQ45fSDKUTILITY.Instance.GetCountryCode();
Debug.Log($"country : {code}");
}
public void ShowH5()
{
ASMhQ45fSDKUTILITY.Instance.H5.ShowH5((() =>
{
Debug.Log("H5 close");
}), () =>
{
Debug.Log($"H5 show failed!");
});
}
public void ShowH5(RectTransform rectTransform)
{
ASMhQ45fSDKUTILITY.Instance.H5.ShowH5(rectTransform);
}
public void HideH5()
{
ASMhQ45fSDKUTILITY.Instance.H5.HideH5();
}
public void CheckShowH5(Image btnImg)
{
var show = ASMhQ45fSDKUTILITY.Instance.H5.IsShowH5();
btnImg.color = show ? Color.green : Color.red;
Debug.Log($"CheckShowH5 : {show}");
}
private int _level = 1;
public void TrackLevel()
{
ASMhQ45fSDKUTILITY.Instance.TrackLevelUp(_level);
if (Random.Range(0, 100) < 50)
{
_level++;
}
}
private string withDrawSceneId = "";
public void GetWithDrawConfigs()
{
ASMhQ45fSDKUTILITY.Instance.GetWithDrawConfigs(((b, s) =>
{
Debug.Log($"GetWithDrawConfigs result : {b}, data : {s}");
if (b)
{
var cfgs = JsonConvert.DeserializeObject<List<WithDrawConfig>>(s);
int idx = 0;
foreach (WithDrawConfig config in cfgs)
{
Debug.Log($"index = {idx}, {config.ToString()}");
if (idx == 0)
withDrawSceneId = config.SecneId;
idx++;
}
}
}));
}
private int payIndex = 0;
public void CreateWithDrawOrder()
{
string taxNo = "";
string payAccount = "tom@gmail.com";
string accountType = "E";
PaymentTypeCode payCode = PaymentTypeCode.GOPAY;
//GOPAY DANA 收款账号需要为电话号码
if (payIndex == 1 || payIndex == 0)
{
payCode = payIndex == 1 ? PaymentTypeCode.DANA : payCode;
payAccount = "0881234567890";
accountType = "P";
}
if (payIndex == 2)
{
// PIX 需要填写税号
payCode = PaymentTypeCode.PIX;
taxNo = "99999999999";
}
if (payIndex == 3) payCode = PaymentTypeCode.MERCADOPAGO;
ASMhQ45fSDKUTILITY.Instance.CreateWithDrawOrder(withDrawSceneId, payCode, payAccount, accountType, "testName", taxNo, b =>
{
Debug.Log($"CreateWithDrawOrder result : {b}");
});
payIndex++;
payIndex = payIndex > 3 ? 0 : payIndex;
}
public void GetWithDrawOrders()
{
ASMhQ45fSDKUTILITY.Instance.GetWithDrawOrders(((b, s) =>
{
Debug.Log($"GetWithDrawOrders result : {b}, data : {s}");
if (b)
{
var cfgs = JsonConvert.DeserializeObject<List<WithDrawOrder>>(s);
int idx = 0;
foreach (WithDrawOrder config in cfgs)
{
Debug.Log($"index = {idx}, {config.ToString()}");
idx++;
}
}
}));
}
// Start is called before the first frame update
void Start()
{
Init();
Invoke("ShowSplash", 5);
}
// Update is called once per frame
void Update()
{
}
private void Init()
{
ASMhQ45fSDKUTILITY.Instance.RegistIosParam((i =>
{
Debug.Log($"ios ab param : {i}");
}));
void GameConfig(bool result, string config)
{
Debug.Log($"************* game config result : {result}, config : {config}");
}
ASMhQ45fSDKUTILITY.Instance.Init(null, "app_config", GameConfig);
}
public static string GetSdkVersion()
{
return ASMhQ45fSDKUTILITY.SdkVersion;
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 959ec24a7131c9d488e5007fa82612be
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 51f8b691978644845a59d4da09bb72e3
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+33
View File
@@ -0,0 +1,33 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &7999829969770386720
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 520568642914021788}
m_Layer: 0
m_Name: Demo
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &520568642914021788
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7999829969770386720}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+7
View File
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 5597cf0c8207a4448a9e84a8800d5cad
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: