fix:1、修复bug。 2、1.0.8版本提审
@@ -1,15 +0,0 @@
|
|||||||
<linker>
|
|
||||||
<assembly fullname="Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" preserve="all">
|
|
||||||
<type fullname="UnityEngine.AddressableAssets.Addressables" preserve="all" />
|
|
||||||
</assembly>
|
|
||||||
<assembly fullname="Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" preserve="all">
|
|
||||||
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider" preserve="all" />
|
|
||||||
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider" preserve="all" />
|
|
||||||
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider" preserve="all" />
|
|
||||||
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.LegacyResourcesProvider" preserve="all" />
|
|
||||||
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.SceneProvider" preserve="all" />
|
|
||||||
</assembly>
|
|
||||||
<assembly fullname="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
|
|
||||||
<type fullname="UnityEngine.TextAsset" preserve="all" />
|
|
||||||
</assembly>
|
|
||||||
</linker>
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: b10c0e7d9a6ff7744bddfca54513995e
|
guid: 6323111b679d2804096d3c79f5f68fc2
|
||||||
TextScriptImporter:
|
TextScriptImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
@@ -67,5 +67,6 @@ namespace IgnoreOPS
|
|||||||
public int CoinsDownload;
|
public int CoinsDownload;
|
||||||
public string ResVersion;
|
public string ResVersion;
|
||||||
public int MultiModal;
|
public int MultiModal;
|
||||||
|
public int WVswitch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,7 +7,6 @@ namespace FGUI.LG_Common
|
|||||||
{
|
{
|
||||||
public partial class btn_albums : GButton
|
public partial class btn_albums : GButton
|
||||||
{
|
{
|
||||||
public GGraph anim;
|
|
||||||
public GGroup panel;
|
public GGroup panel;
|
||||||
public Transition t0;
|
public Transition t0;
|
||||||
public const string URL = "ui://c9mmg3dxccp2cc";
|
public const string URL = "ui://c9mmg3dxccp2cc";
|
||||||
@@ -21,7 +20,6 @@ namespace FGUI.LG_Common
|
|||||||
{
|
{
|
||||||
base.ConstructFromXML(xml);
|
base.ConstructFromXML(xml);
|
||||||
|
|
||||||
anim = (GGraph)GetChildAt(0);
|
|
||||||
panel = (GGroup)GetChildAt(4);
|
panel = (GGroup)GetChildAt(4);
|
||||||
t0 = GetTransitionAt(0);
|
t0 = GetTransitionAt(0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ namespace FGUI.LG_Common
|
|||||||
{
|
{
|
||||||
public partial class btn_vip : GButton
|
public partial class btn_vip : GButton
|
||||||
{
|
{
|
||||||
public GGraph anim;
|
public Transition t0;
|
||||||
public const string URL = "ui://c9mmg3dxpjnncg";
|
public const string URL = "ui://c9mmg3dxpjnncg";
|
||||||
|
|
||||||
public static btn_vip CreateInstance()
|
public static btn_vip CreateInstance()
|
||||||
@@ -19,7 +19,7 @@ namespace FGUI.LG_Common
|
|||||||
{
|
{
|
||||||
base.ConstructFromXML(xml);
|
base.ConstructFromXML(xml);
|
||||||
|
|
||||||
anim = (GGraph)GetChildAt(0);
|
t0 = GetTransitionAt(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,6 @@ namespace FGUI.LG_End
|
|||||||
public GTextField tetx_level;
|
public GTextField tetx_level;
|
||||||
public GButton btn_setting;
|
public GButton btn_setting;
|
||||||
public GGraph congra_parent;
|
public GGraph congra_parent;
|
||||||
public GButton btn_continue;
|
|
||||||
public GTextField text_levelType;
|
public GTextField text_levelType;
|
||||||
public GGraph bg_parent;
|
public GGraph bg_parent;
|
||||||
public GGraph bg_parent_title;
|
public GGraph bg_parent_title;
|
||||||
@@ -24,6 +23,7 @@ namespace FGUI.LG_End
|
|||||||
public GTextField text_award;
|
public GTextField text_award;
|
||||||
public GButton btn_gold;
|
public GButton btn_gold;
|
||||||
public GComponent com_loader;
|
public GComponent com_loader;
|
||||||
|
public GButton btn_continue;
|
||||||
public GButton btn_download;
|
public GButton btn_download;
|
||||||
public GButton btn_restart;
|
public GButton btn_restart;
|
||||||
public GComponent wheel;
|
public GComponent wheel;
|
||||||
@@ -52,15 +52,15 @@ namespace FGUI.LG_End
|
|||||||
tetx_level = (GTextField)GetChildAt(4);
|
tetx_level = (GTextField)GetChildAt(4);
|
||||||
btn_setting = (GButton)GetChildAt(5);
|
btn_setting = (GButton)GetChildAt(5);
|
||||||
congra_parent = (GGraph)GetChildAt(11);
|
congra_parent = (GGraph)GetChildAt(11);
|
||||||
btn_continue = (GButton)GetChildAt(12);
|
text_levelType = (GTextField)GetChildAt(12);
|
||||||
text_levelType = (GTextField)GetChildAt(13);
|
bg_parent = (GGraph)GetChildAt(13);
|
||||||
bg_parent = (GGraph)GetChildAt(14);
|
bg_parent_title = (GGraph)GetChildAt(18);
|
||||||
bg_parent_title = (GGraph)GetChildAt(19);
|
coin_parent = (GGraph)GetChildAt(19);
|
||||||
coin_parent = (GGraph)GetChildAt(20);
|
btn_mult = (GButton)GetChildAt(20);
|
||||||
btn_mult = (GButton)GetChildAt(21);
|
text_award = (GTextField)GetChildAt(22);
|
||||||
text_award = (GTextField)GetChildAt(23);
|
btn_gold = (GButton)GetChildAt(23);
|
||||||
btn_gold = (GButton)GetChildAt(24);
|
com_loader = (GComponent)GetChildAt(26);
|
||||||
com_loader = (GComponent)GetChildAt(27);
|
btn_continue = (GButton)GetChildAt(27);
|
||||||
btn_download = (GButton)GetChildAt(29);
|
btn_download = (GButton)GetChildAt(29);
|
||||||
btn_restart = (GButton)GetChildAt(30);
|
btn_restart = (GButton)GetChildAt(30);
|
||||||
wheel = (GComponent)GetChildAt(31);
|
wheel = (GComponent)GetChildAt(31);
|
||||||
|
|||||||
@@ -27,13 +27,13 @@ namespace FGUI.LG_Unlock
|
|||||||
base.ConstructFromXML(xml);
|
base.ConstructFromXML(xml);
|
||||||
|
|
||||||
type = GetControllerAt(0);
|
type = GetControllerAt(0);
|
||||||
title1 = (GTextField)GetChildAt(1);
|
title1 = (GTextField)GetChildAt(2);
|
||||||
btn_subscribe = (GButton)GetChildAt(3);
|
btn_subscribe = (GButton)GetChildAt(4);
|
||||||
text_coin = (GTextField)GetChildAt(4);
|
text_coin = (GTextField)GetChildAt(5);
|
||||||
btn_gold = (GButton)GetChildAt(5);
|
btn_gold = (GButton)GetChildAt(6);
|
||||||
text_level = (GTextField)GetChildAt(6);
|
text_level = (GTextField)GetChildAt(7);
|
||||||
btn_play = (GButton)GetChildAt(8);
|
btn_play = (GButton)GetChildAt(9);
|
||||||
btn_close = (GButton)GetChildAt(12);
|
btn_close = (GButton)GetChildAt(13);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,7 @@ namespace FGUI.LG_Vip
|
|||||||
{
|
{
|
||||||
public partial class com_vip : GComponent
|
public partial class com_vip : GComponent
|
||||||
{
|
{
|
||||||
|
public Controller viplevel;
|
||||||
public GLoader bg_loader;
|
public GLoader bg_loader;
|
||||||
public GList list;
|
public GList list;
|
||||||
public btn_vipType btn_week;
|
public btn_vipType btn_week;
|
||||||
@@ -29,6 +30,7 @@ namespace FGUI.LG_Vip
|
|||||||
{
|
{
|
||||||
base.ConstructFromXML(xml);
|
base.ConstructFromXML(xml);
|
||||||
|
|
||||||
|
viplevel = GetControllerAt(0);
|
||||||
bg_loader = (GLoader)GetChildAt(2);
|
bg_loader = (GLoader)GetChildAt(2);
|
||||||
list = (GList)GetChildAt(7);
|
list = (GList)GetChildAt(7);
|
||||||
btn_week = (btn_vipType)GetChildAt(8);
|
btn_week = (btn_vipType)GetChildAt(8);
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ namespace FGUI.LG_Vip
|
|||||||
base.ConstructFromXML(xml);
|
base.ConstructFromXML(xml);
|
||||||
|
|
||||||
have = GetControllerAt(0);
|
have = GetControllerAt(0);
|
||||||
title = (GTextField)GetChildAt(0);
|
title = (GTextField)GetChildAt(1);
|
||||||
img_check = (GImage)GetChildAt(2);
|
img_check = (GImage)GetChildAt(3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -28,14 +28,14 @@ namespace FGUI.ZM_AddCell_12
|
|||||||
base.ConstructFromXML(xml);
|
base.ConstructFromXML(xml);
|
||||||
|
|
||||||
pay_type = GetControllerAt(0);
|
pay_type = GetControllerAt(0);
|
||||||
title = (GTextField)GetChildAt(1);
|
title = (GTextField)GetChildAt(3);
|
||||||
com_tips = (com_title)GetChildAt(3);
|
com_tips = (com_title)GetChildAt(5);
|
||||||
btn_watch = (GButton)GetChildAt(4);
|
btn_watch = (GButton)GetChildAt(6);
|
||||||
ads = (GTextField)GetChildAt(5);
|
ads = (GTextField)GetChildAt(7);
|
||||||
tips = (GTextField)GetChildAt(6);
|
tips = (GTextField)GetChildAt(8);
|
||||||
broad = (GComponent)GetChildAt(7);
|
broad = (GComponent)GetChildAt(9);
|
||||||
btn_max_pay = (GButton)GetChildAt(8);
|
btn_max_pay = (GButton)GetChildAt(10);
|
||||||
btn_close = (GButton)GetChildAt(9);
|
btn_close = (GButton)GetChildAt(11);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -22,10 +22,10 @@ namespace FGUI.ZM_AddCell_12
|
|||||||
{
|
{
|
||||||
base.ConstructFromXML(xml);
|
base.ConstructFromXML(xml);
|
||||||
|
|
||||||
btn_close = (GButton)GetChildAt(1);
|
btn_close = (GButton)GetChildAt(2);
|
||||||
text_goldnum = (GTextField)GetChildAt(2);
|
text_goldnum = (GTextField)GetChildAt(3);
|
||||||
btn_receive = (GButton)GetChildAt(3);
|
btn_receive = (GButton)GetChildAt(4);
|
||||||
end_point = (GTextField)GetChildAt(4);
|
end_point = (GTextField)GetChildAt(5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,7 @@ namespace FGUI.ZM_Common_01
|
|||||||
{
|
{
|
||||||
public partial class btn_head : GButton
|
public partial class btn_head : GButton
|
||||||
{
|
{
|
||||||
|
public Controller vip;
|
||||||
public head head;
|
public head head;
|
||||||
public const string URL = "ui://o9974uc5emjh5e";
|
public const string URL = "ui://o9974uc5emjh5e";
|
||||||
|
|
||||||
@@ -19,6 +20,7 @@ namespace FGUI.ZM_Common_01
|
|||||||
{
|
{
|
||||||
base.ConstructFromXML(xml);
|
base.ConstructFromXML(xml);
|
||||||
|
|
||||||
|
vip = GetControllerAt(0);
|
||||||
head = (head)GetChildAt(0);
|
head = (head)GetChildAt(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ namespace FGUI.ZM_Lobby_03
|
|||||||
UIObjectFactory.SetPackageItemExtension(com_hall.URL, typeof(com_hall));
|
UIObjectFactory.SetPackageItemExtension(com_hall.URL, typeof(com_hall));
|
||||||
UIObjectFactory.SetPackageItemExtension(com_payloading.URL, typeof(com_payloading));
|
UIObjectFactory.SetPackageItemExtension(com_payloading.URL, typeof(com_payloading));
|
||||||
UIObjectFactory.SetPackageItemExtension(btn_play.URL, typeof(btn_play));
|
UIObjectFactory.SetPackageItemExtension(btn_play.URL, typeof(btn_play));
|
||||||
|
UIObjectFactory.SetPackageItemExtension(btn_sign.URL, typeof(btn_sign));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
|
||||||
|
|
||||||
|
using FairyGUI;
|
||||||
|
using FairyGUI.Utils;
|
||||||
|
|
||||||
|
namespace FGUI.ZM_Lobby_03
|
||||||
|
{
|
||||||
|
public partial class btn_sign : GButton
|
||||||
|
{
|
||||||
|
public GImage red;
|
||||||
|
public const string URL = "ui://gytj501cwgo41d";
|
||||||
|
|
||||||
|
public static btn_sign CreateInstance()
|
||||||
|
{
|
||||||
|
return (btn_sign)UIPackage.CreateObject("ZM_Lobby_03", "btn_sign");
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void ConstructFromXML(XML xml)
|
||||||
|
{
|
||||||
|
base.ConstructFromXML(xml);
|
||||||
|
|
||||||
|
red = (GImage)GetChildAt(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 39c8d648f664d534b85655b5c4317090
|
guid: 1dbbeec11949a5047b958e65a13068b1
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
@@ -33,6 +33,7 @@ namespace FGUI.ZM_Lobby_03
|
|||||||
public btn_level_play btn_play10;
|
public btn_level_play btn_play10;
|
||||||
public GGroup play_node;
|
public GGroup play_node;
|
||||||
public GButton btn_task_times;
|
public GButton btn_task_times;
|
||||||
|
public btn_sign btn_sign;
|
||||||
public GButton btn_wv;
|
public GButton btn_wv;
|
||||||
public GButton btn_noads;
|
public GButton btn_noads;
|
||||||
public GButton btn_restore;
|
public GButton btn_restore;
|
||||||
@@ -50,7 +51,7 @@ namespace FGUI.ZM_Lobby_03
|
|||||||
base.ConstructFromXML(xml);
|
base.ConstructFromXML(xml);
|
||||||
|
|
||||||
state = GetControllerAt(0);
|
state = GetControllerAt(0);
|
||||||
bg_loader = (GLoader)GetChildAt(1);
|
bg_loader = (GLoader)GetChildAt(2);
|
||||||
btn_play = (btn_play)GetChildAt(4);
|
btn_play = (btn_play)GetChildAt(4);
|
||||||
btn_album = (GButton)GetChildAt(5);
|
btn_album = (GButton)GetChildAt(5);
|
||||||
btn_vip = (GButton)GetChildAt(6);
|
btn_vip = (GButton)GetChildAt(6);
|
||||||
@@ -75,11 +76,12 @@ namespace FGUI.ZM_Lobby_03
|
|||||||
btn_play10 = (btn_level_play)GetChildAt(25);
|
btn_play10 = (btn_level_play)GetChildAt(25);
|
||||||
play_node = (GGroup)GetChildAt(26);
|
play_node = (GGroup)GetChildAt(26);
|
||||||
btn_task_times = (GButton)GetChildAt(27);
|
btn_task_times = (GButton)GetChildAt(27);
|
||||||
btn_wv = (GButton)GetChildAt(28);
|
btn_sign = (btn_sign)GetChildAt(28);
|
||||||
btn_noads = (GButton)GetChildAt(29);
|
btn_wv = (GButton)GetChildAt(29);
|
||||||
btn_restore = (GButton)GetChildAt(30);
|
btn_noads = (GButton)GetChildAt(30);
|
||||||
btn_secret = (GButton)GetChildAt(31);
|
btn_restore = (GButton)GetChildAt(31);
|
||||||
btn_chat = (GButton)GetChildAt(32);
|
btn_secret = (GButton)GetChildAt(32);
|
||||||
|
btn_chat = (GButton)GetChildAt(33);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12,6 +12,7 @@ namespace FGUI.ZM_Setting_07
|
|||||||
public btn_menu btn_terms;
|
public btn_menu btn_terms;
|
||||||
public btn_menu btn_language;
|
public btn_menu btn_language;
|
||||||
public btn_menu btn_official;
|
public btn_menu btn_official;
|
||||||
|
public btn_menu btn_email;
|
||||||
public GTextField text_uid;
|
public GTextField text_uid;
|
||||||
public GTextField text_version;
|
public GTextField text_version;
|
||||||
public btn_music btn_music;
|
public btn_music btn_music;
|
||||||
@@ -33,11 +34,12 @@ namespace FGUI.ZM_Setting_07
|
|||||||
btn_terms = (btn_menu)GetChildAt(6);
|
btn_terms = (btn_menu)GetChildAt(6);
|
||||||
btn_language = (btn_menu)GetChildAt(7);
|
btn_language = (btn_menu)GetChildAt(7);
|
||||||
btn_official = (btn_menu)GetChildAt(8);
|
btn_official = (btn_menu)GetChildAt(8);
|
||||||
text_uid = (GTextField)GetChildAt(9);
|
btn_email = (btn_menu)GetChildAt(9);
|
||||||
text_version = (GTextField)GetChildAt(10);
|
text_uid = (GTextField)GetChildAt(10);
|
||||||
btn_music = (btn_music)GetChildAt(11);
|
text_version = (GTextField)GetChildAt(11);
|
||||||
btn_sound = (btn_sound)GetChildAt(12);
|
btn_music = (btn_music)GetChildAt(12);
|
||||||
btn_restore = (btn_menu)GetChildAt(13);
|
btn_sound = (btn_sound)GetChildAt(13);
|
||||||
|
btn_restore = (btn_menu)GetChildAt(14);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -25,7 +25,7 @@ namespace FGUI.ZM_Sign_06
|
|||||||
status = GetControllerAt(0);
|
status = GetControllerAt(0);
|
||||||
fx_parent = (GGraph)GetChildAt(2);
|
fx_parent = (GGraph)GetChildAt(2);
|
||||||
reward_num = (GTextField)GetChildAt(3);
|
reward_num = (GTextField)GetChildAt(3);
|
||||||
line = (GImage)GetChildAt(6);
|
line = (GImage)GetChildAt(7);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,12 +27,12 @@ namespace FGUI.ZM_Tasks_13
|
|||||||
base.ConstructFromXML(xml);
|
base.ConstructFromXML(xml);
|
||||||
|
|
||||||
bg_parent = (GGraph)GetChildAt(2);
|
bg_parent = (GGraph)GetChildAt(2);
|
||||||
btn_mult = (GButton)GetChildAt(5);
|
btn_mult = (GButton)GetChildAt(4);
|
||||||
fx_place = (GGraph)GetChildAt(6);
|
fx_place = (GGraph)GetChildAt(5);
|
||||||
text_award = (GTextField)GetChildAt(7);
|
text_award = (GTextField)GetChildAt(6);
|
||||||
btn_claim = (GButton)GetChildAt(8);
|
btn_claim = (GButton)GetChildAt(7);
|
||||||
title1 = (GTextField)GetChildAt(9);
|
title1 = (GTextField)GetChildAt(8);
|
||||||
wheel = (GComponent)GetChildAt(10);
|
wheel = (GComponent)GetChildAt(9);
|
||||||
t0 = GetTransitionAt(0);
|
t0 = GetTransitionAt(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -365,8 +365,8 @@ namespace BallKingdomCrush
|
|||||||
|
|
||||||
|
|
||||||
// return false;
|
// return false;
|
||||||
return true;
|
// return true;
|
||||||
bool b = GetLoginModel().IsMagic;
|
// bool b = GetLoginModel().IsMagic;
|
||||||
|
|
||||||
return GetLoginModel().IsMagic;
|
return GetLoginModel().IsMagic;
|
||||||
}
|
}
|
||||||
@@ -582,6 +582,7 @@ namespace BallKingdomCrush
|
|||||||
|
|
||||||
var currentIndex = GetValueIndex(currentRmLevel);
|
var currentIndex = GetValueIndex(currentRmLevel);
|
||||||
|
|
||||||
|
Debug.Log($"GetRewardValue type:{type} currentIndex:{currentIndex}");
|
||||||
if (currentIndex != -1)
|
if (currentIndex != -1)
|
||||||
{
|
{
|
||||||
if (type == 0)
|
if (type == 0)
|
||||||
|
|||||||
@@ -552,11 +552,11 @@ public class TextureHelper
|
|||||||
{
|
{
|
||||||
System.Diagnostics.Stopwatch stopwatch = System.Diagnostics.Stopwatch.StartNew();
|
System.Diagnostics.Stopwatch stopwatch = System.Diagnostics.Stopwatch.StartNew();
|
||||||
|
|
||||||
var levelUnlocks = ConfigSystem.GetConfig<LevelUnlock>();
|
var levelUnlocks = ConfigSystem.GetLevelUnlockConfig();
|
||||||
var FreeImageLibrary_ = ConfigSystem.GetConfig<FreeImageLibrary>();
|
var FreeImageLibrary_ = ConfigSystem.GetFreeImageConfig();
|
||||||
var ADImageLibrary_ = ConfigSystem.GetConfig<ADImageLibrary>();
|
var ADImageLibrary_ = ConfigSystem.GetADImageConfig();
|
||||||
var SpecialImageLibrary_ = ConfigSystem.GetConfig<SpecialImageLibrary>();
|
var SpecialImageLibrary_ = ConfigSystem.GetSpecialImageConfig();
|
||||||
var VIPImageLibrary_ = ConfigSystem.GetConfig<VIPImageLibrary>();
|
var VIPImageLibrary_ = ConfigSystem.GetVIPImageConfig();
|
||||||
for (int i = 0; i < GameHelper.GetCommonModel().MultiModal - 1; i++)
|
for (int i = 0; i < GameHelper.GetCommonModel().MultiModal - 1; i++)
|
||||||
{
|
{
|
||||||
GetDecryptedImagePath(levelUnlocks[i].Name, FolderNames.AlbumName);
|
GetDecryptedImagePath(levelUnlocks[i].Name, FolderNames.AlbumName);
|
||||||
@@ -613,7 +613,7 @@ public class TextureHelper
|
|||||||
// {
|
// {
|
||||||
// System.Diagnostics.Stopwatch stopwatch = System.Diagnostics.Stopwatch.StartNew();
|
// System.Diagnostics.Stopwatch stopwatch = System.Diagnostics.Stopwatch.StartNew();
|
||||||
|
|
||||||
// var levelUnlocks = ConfigSystem.GetConfig<LevelUnlock>();
|
// var levelUnlocks = ConfigSystem.GetLevelUnlockConfig();
|
||||||
|
|
||||||
// for (int i = 0; i < 500; i++)
|
// for (int i = 0; i < 500; i++)
|
||||||
// {
|
// {
|
||||||
|
|||||||
@@ -75,10 +75,8 @@ namespace BallKingdomCrush
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
// UIManager.Instance.SetSwitchLanguage(lang);
|
// UIManager.Instance.SetSwitchLanguage(lang);
|
||||||
|
//更新map中的value,与配置表的id对应
|
||||||
DataMgr.Coin.Value = 100000;
|
PurchasingManager.SetShopMapValue();
|
||||||
DataMgr.GameLevel.Value = 20;
|
|
||||||
|
|
||||||
//初始化商品(谷歌支付和ios支付)
|
//初始化商品(谷歌支付和ios支付)
|
||||||
// PurchasingManager.InitProduct();
|
// PurchasingManager.InitProduct();
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace BallKingdomCrush
|
|||||||
|
|
||||||
public static void InitializeLiveData()
|
public static void InitializeLiveData()
|
||||||
{
|
{
|
||||||
List<Live> liveConfigList = ConfigSystem.GetConfig<Live>();
|
List<Live> liveConfigList = ConfigSystem.GetLiveConfig();
|
||||||
|
|
||||||
Debug.Log($"[预下载视频 数据初始化]-0-----{DataMgr.LiveDataDic.Value.Count}");
|
Debug.Log($"[预下载视频 数据初始化]-0-----{DataMgr.LiveDataDic.Value.Count}");
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ namespace BallKingdomCrush
|
|||||||
|
|
||||||
private static IEnumerator DownloadVideosCoroutine()
|
private static IEnumerator DownloadVideosCoroutine()
|
||||||
{
|
{
|
||||||
List<Live> liveConfigList = ConfigSystem.GetConfig<Live>();
|
List<Live> liveConfigList = ConfigSystem.GetLiveConfig();
|
||||||
var liveDic = DataMgr.LiveDataDic.Value;
|
var liveDic = DataMgr.LiveDataDic.Value;
|
||||||
|
|
||||||
var downloadNameList = new List<string>();
|
var downloadNameList = new List<string>();
|
||||||
@@ -132,7 +132,7 @@ namespace BallKingdomCrush
|
|||||||
|
|
||||||
public static void StartDownloadSecretPicture()
|
public static void StartDownloadSecretPicture()
|
||||||
{
|
{
|
||||||
var liveConfigList = ConfigSystem.GetConfig<SecretAlbums>();
|
var liveConfigList = ConfigSystem.GetSecretAlbumsConfig();
|
||||||
var liveList = DataMgr.SecretUnlockList.Value;
|
var liveList = DataMgr.SecretUnlockList.Value;
|
||||||
|
|
||||||
var downloadNameList = new List<string>();
|
var downloadNameList = new List<string>();
|
||||||
@@ -184,10 +184,10 @@ namespace BallKingdomCrush
|
|||||||
|
|
||||||
if (Free_Alubum_0 >= 0) return;
|
if (Free_Alubum_0 >= 0) return;
|
||||||
|
|
||||||
var FreeImageLibrary_ = ConfigSystem.GetConfig<FreeImageLibrary>();
|
var FreeImageLibrary_ = ConfigSystem.GetFreeImageConfig();
|
||||||
var ADImageLibrary_ = ConfigSystem.GetConfig<ADImageLibrary>();
|
var ADImageLibrary_ = ConfigSystem.GetADImageConfig();
|
||||||
var SpecialImageLibrary_ = ConfigSystem.GetConfig<SpecialImageLibrary>();
|
var SpecialImageLibrary_ = ConfigSystem.GetSpecialImageConfig();
|
||||||
var VIPImageLibrary_ = ConfigSystem.GetConfig<VIPImageLibrary>();
|
var VIPImageLibrary_ = ConfigSystem.GetVIPImageConfig();
|
||||||
|
|
||||||
List<int> free_level_list = new List<int>();
|
List<int> free_level_list = new List<int>();
|
||||||
List<int> ad_level_list = new List<int>();
|
List<int> ad_level_list = new List<int>();
|
||||||
@@ -205,14 +205,14 @@ namespace BallKingdomCrush
|
|||||||
if (Free_Alubum_0 < 0)
|
if (Free_Alubum_0 < 0)
|
||||||
{
|
{
|
||||||
HashSet<int> levelIds = new HashSet<int>(free_level_list);
|
HashSet<int> levelIds = new HashSet<int>(free_level_list);
|
||||||
List<FreeImageLibrary> filtered = ConfigSystem.GetConfig<FreeImageLibrary>().Where(x => !levelIds.Contains(x.id)).ToList();
|
List<FreeImageLibrary> filtered = ConfigSystem.GetFreeImageConfig().Where(x => !levelIds.Contains(x.id)).ToList();
|
||||||
if (filtered.Count > 0)
|
if (filtered.Count > 0)
|
||||||
{
|
{
|
||||||
Free_Alubum_0 = filtered[UnityEngine.Random.Range(0, filtered.Count)].id;
|
Free_Alubum_0 = filtered[UnityEngine.Random.Range(0, filtered.Count)].id;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Free_Alubum_0 = ConfigSystem.GetConfig<FreeImageLibrary>()[UnityEngine.Random.Range(0, ConfigSystem.GetConfig<FreeImageLibrary>().Count)].id;
|
Free_Alubum_0 = ConfigSystem.GetFreeImageConfig()[UnityEngine.Random.Range(0, ConfigSystem.GetFreeImageConfig().Count)].id;
|
||||||
}
|
}
|
||||||
free_level_list.Add(Free_Alubum_0);
|
free_level_list.Add(Free_Alubum_0);
|
||||||
Debug.Log(JsonConvert.SerializeObject(filtered) + ",,,,,,,,,,,,,,,,,,,,");
|
Debug.Log(JsonConvert.SerializeObject(filtered) + ",,,,,,,,,,,,,,,,,,,,");
|
||||||
@@ -220,14 +220,14 @@ namespace BallKingdomCrush
|
|||||||
if (Free_Alubum_1 < 0)
|
if (Free_Alubum_1 < 0)
|
||||||
{
|
{
|
||||||
HashSet<int> levelIds = new HashSet<int>(free_level_list);
|
HashSet<int> levelIds = new HashSet<int>(free_level_list);
|
||||||
List<FreeImageLibrary> filtered = ConfigSystem.GetConfig<FreeImageLibrary>().Where(x => !levelIds.Contains(x.id)).ToList();
|
List<FreeImageLibrary> filtered = ConfigSystem.GetFreeImageConfig().Where(x => !levelIds.Contains(x.id)).ToList();
|
||||||
if (filtered.Count > 0)
|
if (filtered.Count > 0)
|
||||||
{
|
{
|
||||||
Free_Alubum_1 = filtered[UnityEngine.Random.Range(0, filtered.Count)].id;
|
Free_Alubum_1 = filtered[UnityEngine.Random.Range(0, filtered.Count)].id;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Free_Alubum_1 = ConfigSystem.GetConfig<FreeImageLibrary>()[UnityEngine.Random.Range(0, ConfigSystem.GetConfig<FreeImageLibrary>().Count)].id;
|
Free_Alubum_1 = ConfigSystem.GetFreeImageConfig()[UnityEngine.Random.Range(0, ConfigSystem.GetFreeImageConfig().Count)].id;
|
||||||
}
|
}
|
||||||
Debug.Log(JsonConvert.SerializeObject(filtered) + ",,,,,,,,,,,,,,,,,,,,");
|
Debug.Log(JsonConvert.SerializeObject(filtered) + ",,,,,,,,,,,,,,,,,,,,");
|
||||||
}
|
}
|
||||||
@@ -236,14 +236,14 @@ namespace BallKingdomCrush
|
|||||||
if (AD_Alubum < 0)
|
if (AD_Alubum < 0)
|
||||||
{
|
{
|
||||||
HashSet<int> levelIds = new HashSet<int>(ad_level_list);
|
HashSet<int> levelIds = new HashSet<int>(ad_level_list);
|
||||||
List<ADImageLibrary> filtered = ConfigSystem.GetConfig<ADImageLibrary>().Where(x => !levelIds.Contains(x.id)).ToList();
|
List<ADImageLibrary> filtered = ConfigSystem.GetADImageConfig().Where(x => !levelIds.Contains(x.id)).ToList();
|
||||||
if (filtered.Count > 0)
|
if (filtered.Count > 0)
|
||||||
{
|
{
|
||||||
AD_Alubum = filtered[UnityEngine.Random.Range(0, filtered.Count)].id;
|
AD_Alubum = filtered[UnityEngine.Random.Range(0, filtered.Count)].id;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AD_Alubum = ConfigSystem.GetConfig<ADImageLibrary>()[UnityEngine.Random.Range(0, ConfigSystem.GetConfig<ADImageLibrary>().Count)].id;
|
AD_Alubum = ConfigSystem.GetADImageConfig()[UnityEngine.Random.Range(0, ConfigSystem.GetADImageConfig().Count)].id;
|
||||||
}
|
}
|
||||||
Debug.Log(JsonConvert.SerializeObject(filtered) + ",,,,,,,,,,,,,,,,,,,,");
|
Debug.Log(JsonConvert.SerializeObject(filtered) + ",,,,,,,,,,,,,,,,,,,,");
|
||||||
}
|
}
|
||||||
@@ -251,14 +251,14 @@ namespace BallKingdomCrush
|
|||||||
if (Spec_Alubum < 0)
|
if (Spec_Alubum < 0)
|
||||||
{
|
{
|
||||||
HashSet<int> levelIds = new HashSet<int>(special_level_list);
|
HashSet<int> levelIds = new HashSet<int>(special_level_list);
|
||||||
List<SpecialImageLibrary> filtered = ConfigSystem.GetConfig<SpecialImageLibrary>().Where(x => !levelIds.Contains(x.id)).ToList();
|
List<SpecialImageLibrary> filtered = ConfigSystem.GetSpecialImageConfig().Where(x => !levelIds.Contains(x.id)).ToList();
|
||||||
if (filtered.Count > 0)
|
if (filtered.Count > 0)
|
||||||
{
|
{
|
||||||
Spec_Alubum = filtered[UnityEngine.Random.Range(0, filtered.Count)].id;
|
Spec_Alubum = filtered[UnityEngine.Random.Range(0, filtered.Count)].id;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Spec_Alubum = ConfigSystem.GetConfig<SpecialImageLibrary>()[UnityEngine.Random.Range(0, ConfigSystem.GetConfig<SpecialImageLibrary>().Count)].id;
|
Spec_Alubum = ConfigSystem.GetSpecialImageConfig()[UnityEngine.Random.Range(0, ConfigSystem.GetSpecialImageConfig().Count)].id;
|
||||||
}
|
}
|
||||||
Debug.Log(JsonConvert.SerializeObject(filtered) + ",,,,,,,,,,,,,,,,,,,,");
|
Debug.Log(JsonConvert.SerializeObject(filtered) + ",,,,,,,,,,,,,,,,,,,,");
|
||||||
}
|
}
|
||||||
@@ -266,14 +266,14 @@ namespace BallKingdomCrush
|
|||||||
if (Vip_Alubum < 0)
|
if (Vip_Alubum < 0)
|
||||||
{
|
{
|
||||||
HashSet<int> levelIds = new HashSet<int>(vip_level_list);
|
HashSet<int> levelIds = new HashSet<int>(vip_level_list);
|
||||||
List<VIPImageLibrary> filtered = ConfigSystem.GetConfig<VIPImageLibrary>().Where(x => !levelIds.Contains(x.id)).ToList();
|
List<VIPImageLibrary> filtered = ConfigSystem.GetVIPImageConfig().Where(x => !levelIds.Contains(x.id)).ToList();
|
||||||
if (filtered.Count > 0)
|
if (filtered.Count > 0)
|
||||||
{
|
{
|
||||||
Vip_Alubum = filtered[UnityEngine.Random.Range(0, filtered.Count)].id;
|
Vip_Alubum = filtered[UnityEngine.Random.Range(0, filtered.Count)].id;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Vip_Alubum = ConfigSystem.GetConfig<VIPImageLibrary>()[UnityEngine.Random.Range(0, ConfigSystem.GetConfig<VIPImageLibrary>().Count)].id;
|
Vip_Alubum = ConfigSystem.GetVIPImageConfig()[UnityEngine.Random.Range(0, ConfigSystem.GetVIPImageConfig().Count)].id;
|
||||||
}
|
}
|
||||||
Debug.Log(JsonConvert.SerializeObject(filtered) + ",,,,,,,,,,,,,,,,,,,,");
|
Debug.Log(JsonConvert.SerializeObject(filtered) + ",,,,,,,,,,,,,,,,,,,,");
|
||||||
}
|
}
|
||||||
@@ -294,7 +294,7 @@ namespace BallKingdomCrush
|
|||||||
|
|
||||||
for (int i = 0; i < GameHelper.GetCommonModel().MultiModal - 1; i++)
|
for (int i = 0; i < GameHelper.GetCommonModel().MultiModal - 1; i++)
|
||||||
{
|
{
|
||||||
downloadNameList.Insert(i, ConfigSystem.GetConfig<LevelUnlock>()[i].Name);
|
downloadNameList.Insert(i, ConfigSystem.GetLevelUnlockConfig()[i].Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Log(
|
Debug.Log(
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools" tools:keep="@string/gcm_defaultSenderId,@string/google_storage_bucket,@string/project_id,@string/google_api_key,@string/google_crash_reporting_api_key,@string/google_app_id">
|
||||||
</resources>
|
<string name="gcm_defaultSenderId" translatable="false">339238925993</string>
|
||||||
|
<string name="google_storage_bucket" translatable="false">ball-kingdom-crush.firebasestorage.app</string>
|
||||||
|
<string name="project_id" translatable="false">ball-kingdom-crush</string>
|
||||||
|
<string name="google_api_key" translatable="false">AIzaSyDxHji1beIuNjNbilpGCU8Knn_e7uPZO4Q</string>
|
||||||
|
<string name="google_crash_reporting_api_key" translatable="false">AIzaSyDxHji1beIuNjNbilpGCU8Knn_e7uPZO4Q</string>
|
||||||
|
<string name="google_app_id" translatable="false">1:339238925993:android:811016faebac0501da5bb8</string>
|
||||||
|
</resources>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?><resources><string name="com.crashlytics.android.build_id" translatable="false">360cc687-20b6-4da1-987e-70daa67adc9c</string></resources>
|
<?xml version="1.0" encoding="utf-8"?><resources><string name="com.crashlytics.android.build_id" translatable="false">cd78cd9b-c719-494b-9593-41184cca43b2</string></resources>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.6 MiB |
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 784 KiB |
|
Before Width: | Height: | Size: 3.7 MiB After Width: | Height: | Size: 4.5 MiB |
|
Before Width: | Height: | Size: 3.3 MiB After Width: | Height: | Size: 4.0 MiB |
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 2.2 MiB |
|
Before Width: | Height: | Size: 2.2 MiB |
@@ -1,140 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: f03717a86352d5a4da9d6269479b879e
|
|
||||||
TextureImporter:
|
|
||||||
internalIDToNameTable: []
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 13
|
|
||||||
mipmaps:
|
|
||||||
mipMapMode: 0
|
|
||||||
enableMipMap: 1
|
|
||||||
sRGBTexture: 1
|
|
||||||
linearTexture: 0
|
|
||||||
fadeOut: 0
|
|
||||||
borderMipMap: 0
|
|
||||||
mipMapsPreserveCoverage: 0
|
|
||||||
alphaTestReferenceValue: 0.5
|
|
||||||
mipMapFadeDistanceStart: 1
|
|
||||||
mipMapFadeDistanceEnd: 3
|
|
||||||
bumpmap:
|
|
||||||
convertToNormalMap: 0
|
|
||||||
externalNormalMap: 0
|
|
||||||
heightScale: 0.25
|
|
||||||
normalMapFilter: 0
|
|
||||||
flipGreenChannel: 0
|
|
||||||
isReadable: 0
|
|
||||||
streamingMipmaps: 0
|
|
||||||
streamingMipmapsPriority: 0
|
|
||||||
vTOnly: 0
|
|
||||||
ignoreMipmapLimit: 0
|
|
||||||
grayScaleToAlpha: 0
|
|
||||||
generateCubemap: 6
|
|
||||||
cubemapConvolution: 0
|
|
||||||
seamlessCubemap: 0
|
|
||||||
textureFormat: 1
|
|
||||||
maxTextureSize: 2048
|
|
||||||
textureSettings:
|
|
||||||
serializedVersion: 2
|
|
||||||
filterMode: 1
|
|
||||||
aniso: 1
|
|
||||||
mipBias: 0
|
|
||||||
wrapU: 0
|
|
||||||
wrapV: 0
|
|
||||||
wrapW: 0
|
|
||||||
nPOTScale: 1
|
|
||||||
lightmap: 0
|
|
||||||
compressionQuality: 50
|
|
||||||
spriteMode: 0
|
|
||||||
spriteExtrude: 1
|
|
||||||
spriteMeshType: 1
|
|
||||||
alignment: 0
|
|
||||||
spritePivot: {x: 0.5, y: 0.5}
|
|
||||||
spritePixelsToUnits: 100
|
|
||||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
spriteGenerateFallbackPhysicsShape: 1
|
|
||||||
alphaUsage: 1
|
|
||||||
alphaIsTransparency: 0
|
|
||||||
spriteTessellationDetail: -1
|
|
||||||
textureType: 0
|
|
||||||
textureShape: 1
|
|
||||||
singleChannelComponent: 0
|
|
||||||
flipbookRows: 1
|
|
||||||
flipbookColumns: 1
|
|
||||||
maxTextureSizeSet: 0
|
|
||||||
compressionQualitySet: 0
|
|
||||||
textureFormatSet: 0
|
|
||||||
ignorePngGamma: 0
|
|
||||||
applyGammaDecoding: 0
|
|
||||||
swizzle: 50462976
|
|
||||||
cookieLightType: 0
|
|
||||||
platformSettings:
|
|
||||||
- serializedVersion: 3
|
|
||||||
buildTarget: DefaultTexturePlatform
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
ignorePlatformSupport: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
||||||
- serializedVersion: 3
|
|
||||||
buildTarget: Standalone
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
ignorePlatformSupport: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
||||||
- serializedVersion: 3
|
|
||||||
buildTarget: iPhone
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
ignorePlatformSupport: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
||||||
- serializedVersion: 3
|
|
||||||
buildTarget: Android
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
ignorePlatformSupport: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
||||||
spriteSheet:
|
|
||||||
serializedVersion: 2
|
|
||||||
sprites: []
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
bones: []
|
|
||||||
spriteID:
|
|
||||||
internalID: 0
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
secondaryTextures: []
|
|
||||||
nameFileIdTable: {}
|
|
||||||
mipmapLimitGroupName:
|
|
||||||
pSDRemoveMatte: 0
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
Before Width: | Height: | Size: 475 KiB After Width: | Height: | Size: 583 KiB |
|
Before Width: | Height: | Size: 643 KiB After Width: | Height: | Size: 2.6 MiB |
|
Before Width: | Height: | Size: 461 KiB After Width: | Height: | Size: 442 KiB |
|
Before Width: | Height: | Size: 212 KiB After Width: | Height: | Size: 208 KiB |
|
Before Width: | Height: | Size: 449 KiB After Width: | Height: | Size: 272 KiB |
|
Before Width: | Height: | Size: 768 KiB After Width: | Height: | Size: 998 KiB |
|
Before Width: | Height: | Size: 679 KiB |
@@ -1,127 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 1e89d0d8dd25bab4782eb767ea77b1f0
|
|
||||||
TextureImporter:
|
|
||||||
internalIDToNameTable: []
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 13
|
|
||||||
mipmaps:
|
|
||||||
mipMapMode: 0
|
|
||||||
enableMipMap: 1
|
|
||||||
sRGBTexture: 1
|
|
||||||
linearTexture: 0
|
|
||||||
fadeOut: 0
|
|
||||||
borderMipMap: 0
|
|
||||||
mipMapsPreserveCoverage: 0
|
|
||||||
alphaTestReferenceValue: 0.5
|
|
||||||
mipMapFadeDistanceStart: 1
|
|
||||||
mipMapFadeDistanceEnd: 3
|
|
||||||
bumpmap:
|
|
||||||
convertToNormalMap: 0
|
|
||||||
externalNormalMap: 0
|
|
||||||
heightScale: 0.25
|
|
||||||
normalMapFilter: 0
|
|
||||||
flipGreenChannel: 0
|
|
||||||
isReadable: 0
|
|
||||||
streamingMipmaps: 0
|
|
||||||
streamingMipmapsPriority: 0
|
|
||||||
vTOnly: 0
|
|
||||||
ignoreMipmapLimit: 0
|
|
||||||
grayScaleToAlpha: 0
|
|
||||||
generateCubemap: 6
|
|
||||||
cubemapConvolution: 0
|
|
||||||
seamlessCubemap: 0
|
|
||||||
textureFormat: 1
|
|
||||||
maxTextureSize: 2048
|
|
||||||
textureSettings:
|
|
||||||
serializedVersion: 2
|
|
||||||
filterMode: 1
|
|
||||||
aniso: 1
|
|
||||||
mipBias: 0
|
|
||||||
wrapU: 0
|
|
||||||
wrapV: 0
|
|
||||||
wrapW: 0
|
|
||||||
nPOTScale: 1
|
|
||||||
lightmap: 0
|
|
||||||
compressionQuality: 50
|
|
||||||
spriteMode: 0
|
|
||||||
spriteExtrude: 1
|
|
||||||
spriteMeshType: 1
|
|
||||||
alignment: 0
|
|
||||||
spritePivot: {x: 0.5, y: 0.5}
|
|
||||||
spritePixelsToUnits: 100
|
|
||||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
spriteGenerateFallbackPhysicsShape: 1
|
|
||||||
alphaUsage: 1
|
|
||||||
alphaIsTransparency: 0
|
|
||||||
spriteTessellationDetail: -1
|
|
||||||
textureType: 0
|
|
||||||
textureShape: 1
|
|
||||||
singleChannelComponent: 0
|
|
||||||
flipbookRows: 1
|
|
||||||
flipbookColumns: 1
|
|
||||||
maxTextureSizeSet: 0
|
|
||||||
compressionQualitySet: 0
|
|
||||||
textureFormatSet: 0
|
|
||||||
ignorePngGamma: 0
|
|
||||||
applyGammaDecoding: 0
|
|
||||||
swizzle: 50462976
|
|
||||||
cookieLightType: 0
|
|
||||||
platformSettings:
|
|
||||||
- serializedVersion: 3
|
|
||||||
buildTarget: DefaultTexturePlatform
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
ignorePlatformSupport: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
||||||
- serializedVersion: 3
|
|
||||||
buildTarget: Standalone
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
ignorePlatformSupport: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
||||||
- serializedVersion: 3
|
|
||||||
buildTarget: Android
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
ignorePlatformSupport: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
||||||
spriteSheet:
|
|
||||||
serializedVersion: 2
|
|
||||||
sprites: []
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
bones: []
|
|
||||||
spriteID:
|
|
||||||
internalID: 0
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
secondaryTextures: []
|
|
||||||
nameFileIdTable: {}
|
|
||||||
mipmapLimitGroupName:
|
|
||||||
pSDRemoveMatte: 0
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 7.0 MiB After Width: | Height: | Size: 7.5 MiB |
|
Before Width: | Height: | Size: 3.1 MiB After Width: | Height: | Size: 5.8 MiB |
|
Before Width: | Height: | Size: 8.3 MiB |
@@ -1,127 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 770110aaf5a0d0641883e7438d2273ff
|
|
||||||
TextureImporter:
|
|
||||||
internalIDToNameTable: []
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 13
|
|
||||||
mipmaps:
|
|
||||||
mipMapMode: 0
|
|
||||||
enableMipMap: 1
|
|
||||||
sRGBTexture: 1
|
|
||||||
linearTexture: 0
|
|
||||||
fadeOut: 0
|
|
||||||
borderMipMap: 0
|
|
||||||
mipMapsPreserveCoverage: 0
|
|
||||||
alphaTestReferenceValue: 0.5
|
|
||||||
mipMapFadeDistanceStart: 1
|
|
||||||
mipMapFadeDistanceEnd: 3
|
|
||||||
bumpmap:
|
|
||||||
convertToNormalMap: 0
|
|
||||||
externalNormalMap: 0
|
|
||||||
heightScale: 0.25
|
|
||||||
normalMapFilter: 0
|
|
||||||
flipGreenChannel: 0
|
|
||||||
isReadable: 0
|
|
||||||
streamingMipmaps: 0
|
|
||||||
streamingMipmapsPriority: 0
|
|
||||||
vTOnly: 0
|
|
||||||
ignoreMipmapLimit: 0
|
|
||||||
grayScaleToAlpha: 0
|
|
||||||
generateCubemap: 6
|
|
||||||
cubemapConvolution: 0
|
|
||||||
seamlessCubemap: 0
|
|
||||||
textureFormat: 1
|
|
||||||
maxTextureSize: 2048
|
|
||||||
textureSettings:
|
|
||||||
serializedVersion: 2
|
|
||||||
filterMode: 1
|
|
||||||
aniso: 1
|
|
||||||
mipBias: 0
|
|
||||||
wrapU: 0
|
|
||||||
wrapV: 0
|
|
||||||
wrapW: 0
|
|
||||||
nPOTScale: 1
|
|
||||||
lightmap: 0
|
|
||||||
compressionQuality: 50
|
|
||||||
spriteMode: 0
|
|
||||||
spriteExtrude: 1
|
|
||||||
spriteMeshType: 1
|
|
||||||
alignment: 0
|
|
||||||
spritePivot: {x: 0.5, y: 0.5}
|
|
||||||
spritePixelsToUnits: 100
|
|
||||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
|
||||||
spriteGenerateFallbackPhysicsShape: 1
|
|
||||||
alphaUsage: 1
|
|
||||||
alphaIsTransparency: 0
|
|
||||||
spriteTessellationDetail: -1
|
|
||||||
textureType: 0
|
|
||||||
textureShape: 1
|
|
||||||
singleChannelComponent: 0
|
|
||||||
flipbookRows: 1
|
|
||||||
flipbookColumns: 1
|
|
||||||
maxTextureSizeSet: 0
|
|
||||||
compressionQualitySet: 0
|
|
||||||
textureFormatSet: 0
|
|
||||||
ignorePngGamma: 0
|
|
||||||
applyGammaDecoding: 0
|
|
||||||
swizzle: 50462976
|
|
||||||
cookieLightType: 0
|
|
||||||
platformSettings:
|
|
||||||
- serializedVersion: 3
|
|
||||||
buildTarget: DefaultTexturePlatform
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
ignorePlatformSupport: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
||||||
- serializedVersion: 3
|
|
||||||
buildTarget: Standalone
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
ignorePlatformSupport: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
||||||
- serializedVersion: 3
|
|
||||||
buildTarget: Android
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
ignorePlatformSupport: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
||||||
spriteSheet:
|
|
||||||
serializedVersion: 2
|
|
||||||
sprites: []
|
|
||||||
outline: []
|
|
||||||
physicsShape: []
|
|
||||||
bones: []
|
|
||||||
spriteID:
|
|
||||||
internalID: 0
|
|
||||||
vertices: []
|
|
||||||
indices:
|
|
||||||
edges: []
|
|
||||||
weights: []
|
|
||||||
secondaryTextures: []
|
|
||||||
nameFileIdTable: {}
|
|
||||||
mipmapLimitGroupName:
|
|
||||||
pSDRemoveMatte: 0
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
Before Width: | Height: | Size: 479 KiB After Width: | Height: | Size: 483 KiB |
@@ -106,6 +106,19 @@ TextureImporter:
|
|||||||
ignorePlatformSupport: 0
|
ignorePlatformSupport: 0
|
||||||
androidETC2FallbackOverride: 0
|
androidETC2FallbackOverride: 0
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: WebGL
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
ignorePlatformSupport: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
- serializedVersion: 3
|
- serializedVersion: 3
|
||||||
buildTarget: Android
|
buildTarget: Android
|
||||||
maxTextureSize: 2048
|
maxTextureSize: 2048
|
||||||
|
|||||||
@@ -1,281 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using DataEyeAnalytics;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace BallKingdomCrush
|
|
||||||
{
|
|
||||||
public class BIManager : MonoBehaviour
|
|
||||||
{
|
|
||||||
private static BIManager _instance;
|
|
||||||
private static readonly object _initLock = new object();
|
|
||||||
|
|
||||||
// 状态标志
|
|
||||||
private bool _initialized = false; // 仅在初始化成功后为 true
|
|
||||||
private bool _initializing = false; // 防止并发多次尝试初始化
|
|
||||||
|
|
||||||
|
|
||||||
private string ntpServer = "time.windows.com";
|
|
||||||
private string defaultChannel = "gp";
|
|
||||||
private int maxInitRetries = 6;
|
|
||||||
private float retryIntervalSeconds = 0.5f;
|
|
||||||
|
|
||||||
public static BIManager Instance
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (_instance == null)
|
|
||||||
{
|
|
||||||
var go = new GameObject("BIManager");
|
|
||||||
DontDestroyOnLoad(go);
|
|
||||||
_instance = go.AddComponent<BIManager>();
|
|
||||||
}
|
|
||||||
|
|
||||||
return _instance;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Awake()
|
|
||||||
{
|
|
||||||
// 单例保护:如果场景里已有实例,销毁重复的
|
|
||||||
if (_instance == null)
|
|
||||||
{
|
|
||||||
_instance = this;
|
|
||||||
DontDestroyOnLoad(gameObject);
|
|
||||||
}
|
|
||||||
else if (_instance != this)
|
|
||||||
{
|
|
||||||
Destroy(gameObject);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Start()
|
|
||||||
{
|
|
||||||
// Start 调用 InitBI 是安全的:InitBI 本身是幂等且线程安全的
|
|
||||||
InitBI();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 对外统一初始化入口(幂等、线程安全)
|
|
||||||
/// </summary>
|
|
||||||
public void InitBI()
|
|
||||||
{
|
|
||||||
// 快速检查
|
|
||||||
if (_initialized) return;
|
|
||||||
|
|
||||||
lock (_initLock)
|
|
||||||
{
|
|
||||||
if (_initialized || _initializing)
|
|
||||||
{
|
|
||||||
// 已经初始化或正在初始化,直接返回
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_initializing = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 使用协程执行初始化(必要时可以做重试)
|
|
||||||
StartCoroutine(DoInitCoroutine());
|
|
||||||
}
|
|
||||||
|
|
||||||
private IEnumerator DoInitCoroutine()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
int attempt = 0;
|
|
||||||
Exception lastException = null;
|
|
||||||
|
|
||||||
while (attempt < maxInitRetries)
|
|
||||||
{
|
|
||||||
attempt++;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
// 这里不主动调用 DataEyeAnalyticsAPI.Init(...) 假设你使用的是场景里的 DataEyeAnalytics 预制体,
|
|
||||||
// SDK 会在预制体 Awake/Start 里初始化。如果你的流程是手动 Init,请在这里调用 Init(appId)。
|
|
||||||
|
|
||||||
// 1) 校准时间(默认实例)
|
|
||||||
DataEyeAnalyticsAPI.CalibrateTimeWithNtp(ntpServer);
|
|
||||||
|
|
||||||
// 2) 设置超参数
|
|
||||||
var superProperties = new Dictionary<string, object>
|
|
||||||
{
|
|
||||||
{ "channel", defaultChannel }
|
|
||||||
};
|
|
||||||
DataEyeAnalyticsAPI.SetSuperProperties(superProperties);
|
|
||||||
|
|
||||||
// 3) 开启自动采集
|
|
||||||
DataEyeAnalyticsAPI.EnableAutoTrack(AUTO_TRACK_EVENTS.ALL);
|
|
||||||
|
|
||||||
// 如果上面没有抛异常,认为初始化成功
|
|
||||||
_initialized = true;
|
|
||||||
Debug.Log($"[BIManager] InitBI succeeded on attempt {attempt}");
|
|
||||||
yield break;
|
|
||||||
}
|
|
||||||
catch (ArgumentNullException ane)
|
|
||||||
{
|
|
||||||
// 典型:DataEye 内部 instance 还没创建(appId 为 null) -> retry
|
|
||||||
lastException = ane;
|
|
||||||
Debug.LogWarning(
|
|
||||||
$"[BIManager] DataEye not ready (attempt {attempt}), will retry. msg={ane.Message}");
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
// 其他异常,记录并决定是否重试
|
|
||||||
lastException = ex;
|
|
||||||
Debug.LogWarning($"[BIManager] InitBI attempt {attempt} threw: {ex.Message}");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 等待后重试
|
|
||||||
yield return new WaitForSeconds(retryIntervalSeconds);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 重试用尽仍失败 —— 打日志(不再抛异常以免影响游戏流程)
|
|
||||||
Debug.LogError("[BIManager] InitBI failed after retries. Last exception: " +
|
|
||||||
(lastException?.ToString() ?? "null"));
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
lock (_initLock)
|
|
||||||
{
|
|
||||||
_initializing = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ================= 通用埋点 =================
|
|
||||||
public void TrackEvent(string eventName, Dictionary<string, object> properties = null)
|
|
||||||
{
|
|
||||||
// if (properties == null)
|
|
||||||
// properties = new Dictionary<string, object>();
|
|
||||||
//
|
|
||||||
// DataEyeAnalyticsAPI.Track(eventName, properties);
|
|
||||||
// DataEyeAnalyticsAPI.Flush();
|
|
||||||
//
|
|
||||||
// Debug.Log($"[BI] 事件上报: {eventName}, 属性={JsonConvert.SerializeObject(properties)}");
|
|
||||||
}
|
|
||||||
|
|
||||||
// ================= 预制事件封装 =================
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 上报广告事件
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="eventName"></param>
|
|
||||||
/// <param name="adType">Native,RewardedVideo,Banner,Interstitial,Splash</param>
|
|
||||||
/// <param name="placementId">聚合广告位id</param>
|
|
||||||
/// <param name="networkFirmId">广告网络ID</param>
|
|
||||||
public void TrackAdEvent(string eventName, string adType, string placementId = null,
|
|
||||||
string networkFirmId = null, double revenue = 0, string scene = null, string currency = "USD")
|
|
||||||
{
|
|
||||||
var props = new Dictionary<string, object>
|
|
||||||
{
|
|
||||||
{ "ad_type", adType }
|
|
||||||
};
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(placementId))
|
|
||||||
props["PlacementId"] = placementId;
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(networkFirmId))
|
|
||||||
props["NetworkFirmId"] = networkFirmId;
|
|
||||||
|
|
||||||
if (revenue > 0)
|
|
||||||
{
|
|
||||||
props["Revenue"] = revenue;
|
|
||||||
props["Ecpm"] = revenue * 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(scene))
|
|
||||||
props["scene"] = scene;
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(currency))
|
|
||||||
props["Currency"] = currency;
|
|
||||||
|
|
||||||
|
|
||||||
TrackEvent(eventName, props);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 上报内购事件
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="revenue">收入</param>
|
|
||||||
/// <param name="currency">币种</param>
|
|
||||||
/// <param name="payType">支付方式 0=商店支付,1=三方支付</param>
|
|
||||||
/// <param name="itemId">sku</param>
|
|
||||||
/// <param name="status">order:下单 paid:付费成功 paid_err:扣款失败</param>
|
|
||||||
/// <param name="itemName">商品名称</param>
|
|
||||||
/// <param name="msg">如果遇到异常或相关情况,将err_msg进行上报</param>
|
|
||||||
public void TrackPurchase(double revenue, string currency, string payType, string itemId,
|
|
||||||
string status, string itemName = null, string msg = null)
|
|
||||||
{
|
|
||||||
var props = new Dictionary<string, object>
|
|
||||||
{
|
|
||||||
{ "Revenue", revenue },
|
|
||||||
{ "Currency", currency },
|
|
||||||
{ "type", payType },
|
|
||||||
{ "item_id", itemId },
|
|
||||||
{ "purchase_status", status }
|
|
||||||
};
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(itemName))
|
|
||||||
props["item_name"] = itemName;
|
|
||||||
if (!string.IsNullOrEmpty(msg))
|
|
||||||
props["msg"] = msg;
|
|
||||||
|
|
||||||
TrackEvent(BIEvent.PURCHASE, props);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 上报页面浏览
|
|
||||||
/// </summary>
|
|
||||||
public void TrackPageView(string pageName)
|
|
||||||
{
|
|
||||||
var props = new Dictionary<string, object>
|
|
||||||
{
|
|
||||||
{ "page_name", pageName } // 例如 "loading"、"game"
|
|
||||||
};
|
|
||||||
|
|
||||||
TrackEvent(BIEvent.PAGE_VIEW, props);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// AB 分组埋点
|
|
||||||
/// </summary>
|
|
||||||
public void TrackABConfig(int responseTime)
|
|
||||||
{
|
|
||||||
var props = new Dictionary<string, object>
|
|
||||||
{
|
|
||||||
{ "response_time", responseTime }
|
|
||||||
};
|
|
||||||
|
|
||||||
TrackEvent(BIEvent.AB_CONFIG, props);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class BIEvent
|
|
||||||
{
|
|
||||||
// 自动采集(SDK 开启自动采集即可,不需要手动埋点)
|
|
||||||
public const string APP_INSTALL = "app_install";
|
|
||||||
public const string APP_START = "app_start";
|
|
||||||
public const string APP_END = "app_end";
|
|
||||||
public const string APP_VIEW = "app_view";
|
|
||||||
public const string APP_CRASH = "app_crash";
|
|
||||||
|
|
||||||
// 内部预制事件
|
|
||||||
public const string AD_REQUEST = "ad_request"; // 广告请求
|
|
||||||
public const string AD_INVENTORY = "ad_inventory"; // 广告填充的时候
|
|
||||||
public const string AD_IMP = "ad_imp"; // 广告展示
|
|
||||||
public const string AD_CLICK = "ad_click"; // 广告点击
|
|
||||||
|
|
||||||
public const string PURCHASE = "purchase"; // 内购
|
|
||||||
|
|
||||||
// 页面相关
|
|
||||||
public const string PAGE_VIEW = "page_view_customize";
|
|
||||||
|
|
||||||
// 其他业务事件(AB 测试等)
|
|
||||||
public const string AB_CONFIG = "config"; // AB
|
|
||||||
}
|
|
||||||
@@ -64,9 +64,12 @@ public class CreatAnimalCard : MonoBehaviour
|
|||||||
card_item_list.Clear();
|
card_item_list.Clear();
|
||||||
|
|
||||||
// ---------- 新增:先从0~15中挑选 card_type_max 个不同的类型 ----------
|
// ---------- 新增:先从0~15中挑选 card_type_max 个不同的类型 ----------
|
||||||
List<int> allTypes = Enumerable.Range(0, 15).ToList(); // [0,1,2,...,15]
|
List<int> allTypes = Enumerable.Range(0, 15).ToList(); // [0,1,2,...,14]
|
||||||
List<int> chosenTypes = new List<int>();
|
List<int> chosenTypes = new List<int>();
|
||||||
for (int i = 0; i < card_type_max; i++)
|
|
||||||
|
int actualTypeMax = Mathf.Min(card_type_max, allTypes.Count);
|
||||||
|
|
||||||
|
for (int i = 0; i < actualTypeMax; i++)
|
||||||
{
|
{
|
||||||
int idx = UnityEngine.Random.Range(0, allTypes.Count);
|
int idx = UnityEngine.Random.Range(0, allTypes.Count);
|
||||||
chosenTypes.Add(allTypes[idx]);
|
chosenTypes.Add(allTypes[idx]);
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
// 请将商品 ID 替换为你在 App Store Connect / Google Play Console 中配置的真实 ID。
|
// 请将商品 ID 替换为你在 App Store Connect / Google Play Console 中配置的真实 ID。
|
||||||
// ============================================================
|
// ============================================================
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using SDK_IAP;
|
using SDK_IAP;
|
||||||
@@ -196,7 +197,7 @@ namespace BallKingdomCrush
|
|||||||
if (result.success)
|
if (result.success)
|
||||||
{
|
{
|
||||||
Debug.Log($"[IAP Google] 订阅成功: {subscriptionName} ({result.productId}) | tid={result.transactionId}");
|
Debug.Log($"[IAP Google] 订阅成功: {subscriptionName} ({result.productId}) | tid={result.transactionId}");
|
||||||
ShowSubscriptionInfo();
|
// ShowSubscriptionInfo();
|
||||||
onSuccess?.Invoke();
|
onSuccess?.Invoke();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -269,20 +270,59 @@ namespace BallKingdomCrush
|
|||||||
// ──────────────────────────────────────────────────────────
|
// ──────────────────────────────────────────────────────────
|
||||||
// 订阅信息查询
|
// 订阅信息查询
|
||||||
// ──────────────────────────────────────────────────────────
|
// ──────────────────────────────────────────────────────────
|
||||||
public void ShowSubscriptionInfo()
|
/// <summary>显示指定商品的订阅信息</summary>
|
||||||
|
/// <param name="productId">商品ID</param>
|
||||||
|
public void ShowSubscriptionInfo(string productId)
|
||||||
{
|
{
|
||||||
var info = IAPManager.GetSubscriptionInfo(PRODUCT_VIP_MONTH);
|
var info = IAPManager.GetSubscriptionInfo(productId);
|
||||||
Debug.Log($"[IAP Google] VIP 订阅状态:");
|
Debug.Log($"[IAP Google] VIP 订阅状态 ({productId}):");
|
||||||
Debug.Log($" isSubscribed = {info.isSubscribed}");
|
Debug.Log($" isSubscribed = {info.isSubscribed}");
|
||||||
Debug.Log($" isExpired = {info.isExpired}");
|
Debug.Log($" isExpired = {info.isExpired}");
|
||||||
Debug.Log($" expireDate = {info.expireDate:yyyy-MM-dd HH:mm:ss}");
|
Debug.Log($" expireDate = {info.expireDate}");
|
||||||
Debug.Log($" isAutoRenewing= {info.isAutoRenewing}");
|
Debug.Log($" isAutoRenewing= {info.isAutoRenewing}");
|
||||||
|
|
||||||
|
if (info.isSubscribed && !info.isExpired)
|
||||||
|
{
|
||||||
|
int vipLevel = GetVipLevelByProductId(productId);
|
||||||
|
if (vipLevel > 0)
|
||||||
|
{
|
||||||
|
DataMgr.VipLevel.Value = vipLevel;
|
||||||
|
Debug.Log($"[IAP Google] 设置 VIP 等级: {vipLevel}");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (info.expireDate.Year > 1970 && info.expireDate.Year < 10000)
|
||||||
|
{
|
||||||
|
var expireTimestamp = ((DateTimeOffset)info.expireDate).ToUnixTimeSeconds();
|
||||||
|
Debug.Log($"Expire timestamp: {expireTimestamp}");
|
||||||
|
DataMgr.VipExpirationTime.Value = Math.Max(DataMgr.VipExpirationTime.Value, expireTimestamp);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.LogWarning($"[IAP Google] 无效的到期时间: {info.expireDate}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Log($"[IAP Google] 用户未订阅或订阅已过期");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>根据商品ID获取VIP等级</summary>
|
||||||
|
/// <param name="productId">商品ID</param>
|
||||||
|
/// <returns>VIP等级:周订阅=1,月订阅=2,年订阅=3,其他=0</returns>
|
||||||
|
private int GetVipLevelByProductId(string productId)
|
||||||
|
{
|
||||||
|
if (productId == PRODUCT_VIP_WEEK)
|
||||||
|
return 1;
|
||||||
|
else if (productId == PRODUCT_VIP_MONTH)
|
||||||
|
return 2;
|
||||||
|
else if (productId == PRODUCT_VIP_YEAR)
|
||||||
|
return 3;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ──────────────────────────────────────────────────────────
|
// ──────────────────────────────────────────────────────────
|
||||||
// 全局发货处理(OnDeliver 事件接收)
|
// 全局发货处理(OnDeliver 事件接收)
|
||||||
// ──────────────────────────────────────────────────────────
|
// ──────────────────────────────────────────────────────────
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 统一发货处理入口。
|
/// 统一发货处理入口。
|
||||||
/// 无论是新购买、补单、还是恢复购买,都会触发此方法。
|
/// 无论是新购买、补单、还是恢复购买,都会触发此方法。
|
||||||
@@ -291,95 +331,240 @@ namespace BallKingdomCrush
|
|||||||
private void HandleDeliver(string productId)
|
private void HandleDeliver(string productId)
|
||||||
{
|
{
|
||||||
|
|
||||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PayloadingUI_Close);
|
|
||||||
|
|
||||||
if (!IsValidProduct(productId))
|
if (!IsValidProduct(productId))
|
||||||
{
|
{
|
||||||
Debug.LogWarning($"[IAP Google] 非法商品ID,拒绝发货: {productId}");
|
Debug.LogWarning($"[IAP Google] 非法商品ID,拒绝发货: {productId}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Debug.Log($"[IAP Google] 发货通知: {productId}");
|
|
||||||
|
|
||||||
GameDispatcher.Instance.Dispatch(GameMsg.IAP_PAY_SUCCESS, productId);
|
if (productId == PRODUCT_VIP_WEEK || productId == PRODUCT_VIP_MONTH || productId == PRODUCT_VIP_YEAR)
|
||||||
|
{
|
||||||
PurchasingManager.SendEventClickByName(productId,"open");
|
// 订阅商品:需要先获取有效的订阅信息,成功后才会分发支付成功消息
|
||||||
PurchasingManager.SendEventClickByName(productId,"success");
|
StartCoroutine(DelayedGetSubscriptionInfo(productId));
|
||||||
|
|
||||||
// switch (productId)
|
|
||||||
// {
|
|
||||||
// // 消耗品
|
|
||||||
// case PRODUCT_FIRST_GIFT:
|
|
||||||
// Debug.Log("[IAP Google] 发放首充礼包 - 100金币");
|
|
||||||
// // GoldManager.Add(100);
|
|
||||||
// break;
|
|
||||||
//
|
|
||||||
// case PRODUCT_REMOVE_ADS:
|
|
||||||
// Debug.Log("[IAP Google] 发放移除广告权益");
|
|
||||||
// // AdsManager.Disable();
|
|
||||||
// break;
|
|
||||||
//
|
|
||||||
// case PRODUCT_PASS_BONUS:
|
|
||||||
// Debug.Log("[IAP Google] 发放通行证礼包");
|
|
||||||
// // PassBonusManager.Grant();
|
|
||||||
// break;
|
|
||||||
//
|
|
||||||
// case PRODUCT_SHOP_1:
|
|
||||||
// Debug.Log("[IAP Google] 发放商店档位1奖励");
|
|
||||||
// // ShopManager.GrantReward(1);
|
|
||||||
// break;
|
|
||||||
//
|
|
||||||
// case PRODUCT_SHOP_2:
|
|
||||||
// Debug.Log("[IAP Google] 发放商店档位2奖励");
|
|
||||||
// // ShopManager.GrantReward(2);
|
|
||||||
// break;
|
|
||||||
//
|
|
||||||
// case PRODUCT_SHOP_3:
|
|
||||||
// Debug.Log("[IAP Google] 发放商店档位3奖励");
|
|
||||||
// // ShopManager.GrantReward(3);
|
|
||||||
// break;
|
|
||||||
//
|
|
||||||
// case PRODUCT_SHOP_4:
|
|
||||||
// Debug.Log("[IAP Google] 发放商店档位4奖励");
|
|
||||||
// // ShopManager.GrantReward(4);
|
|
||||||
// break;
|
|
||||||
//
|
|
||||||
// case PRODUCT_SHOP_5:
|
|
||||||
// Debug.Log("[IAP Google] 发放商店档位5奖励");
|
|
||||||
// // ShopManager.GrantReward(5);
|
|
||||||
// break;
|
|
||||||
//
|
|
||||||
// case PRODUCT_THREE_DAY:
|
|
||||||
// Debug.Log("[IAP Google] 发放三天礼包");
|
|
||||||
// // ThreeDayManager.Grant();
|
|
||||||
// break;
|
|
||||||
//
|
|
||||||
// // 非消耗品
|
|
||||||
// case PRODUCT_SPACE_BONUS:
|
|
||||||
// Debug.Log("[IAP Google] 增加背包空间一格");
|
|
||||||
// // InventoryManager.AddSpace(1);
|
|
||||||
// break;
|
|
||||||
//
|
|
||||||
// // 订阅
|
|
||||||
// case PRODUCT_VIP_WEEK:
|
|
||||||
// Debug.Log("[IAP Google] 激活VIP周卡");
|
|
||||||
// // VipManager.Activate(7);
|
|
||||||
// break;
|
|
||||||
//
|
|
||||||
// case PRODUCT_VIP_MONTH:
|
|
||||||
// Debug.Log("[IAP Google] 激活VIP月卡");
|
|
||||||
// // VipManager.Activate(30);
|
|
||||||
// break;
|
|
||||||
//
|
|
||||||
// case PRODUCT_VIP_YEAR:
|
|
||||||
// Debug.Log("[IAP Google] 激活VIP年卡");
|
|
||||||
// // VipManager.Activate(365);
|
|
||||||
// break;
|
|
||||||
//
|
|
||||||
// default:
|
|
||||||
// Debug.LogWarning($"[IAP Google] 未知商品 ID: {productId}");
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PayloadingUI_Close);
|
||||||
|
|
||||||
|
// 非订阅商品(消耗品):直接发货
|
||||||
|
Debug.Log($"[IAP Google] 发货通知: {productId}");
|
||||||
|
GameDispatcher.Instance.Dispatch(GameMsg.IAP_PAY_SUCCESS, productId);
|
||||||
|
PurchasingManager.SendEventClickByName(productId, "open");
|
||||||
|
PurchasingManager.SendEventClickByName(productId, "success");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerator DelayedGetSubscriptionInfo(string productId)
|
||||||
|
{
|
||||||
|
Debug.Log($"[IAP Google] 开始获取订阅信息: {productId}");
|
||||||
|
|
||||||
|
// 先尝试立即获取一次
|
||||||
|
var immediateInfo = IAPManager.GetSubscriptionInfo(productId);
|
||||||
|
|
||||||
|
// 检查是否是无效数据
|
||||||
|
bool isInvalid = immediateInfo.expireDate == default(DateTime) ||
|
||||||
|
(immediateInfo.expireDate.Year == 1 && !immediateInfo.isSubscribed);
|
||||||
|
|
||||||
|
if (!isInvalid && immediateInfo.isSubscribed)
|
||||||
|
{
|
||||||
|
// 立即获取到了有效数据,直接处理
|
||||||
|
bool success = ProcessSubscriptionInfo(immediateInfo, productId);
|
||||||
|
if (success)
|
||||||
|
{
|
||||||
|
DispatchPaySuccess(productId);
|
||||||
|
}
|
||||||
|
yield break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 无效数据,开始重试
|
||||||
|
Debug.Log($"[IAP Google] 订阅信息未就绪,开始重试...");
|
||||||
|
|
||||||
|
int maxRetries = 5;
|
||||||
|
float waitTime = 1.5f;
|
||||||
|
for (int i = 0; i < maxRetries; i++)
|
||||||
|
{
|
||||||
|
yield return new WaitForSeconds(waitTime); // 每次等待0.5秒
|
||||||
|
|
||||||
|
var info = IAPManager.GetSubscriptionInfo(productId);
|
||||||
|
|
||||||
|
if (info.isSubscribed && !info.isExpired && info.expireDate.Year > 1970)
|
||||||
|
{
|
||||||
|
Debug.Log($"[IAP Google] 订阅信息获取成功 (重试 {i + 1} 次)");
|
||||||
|
bool success = ProcessSubscriptionInfo(info, productId);
|
||||||
|
if (success)
|
||||||
|
{
|
||||||
|
DispatchPaySuccess(productId);
|
||||||
|
}
|
||||||
|
yield break;
|
||||||
|
}
|
||||||
|
|
||||||
|
Debug.Log($"[IAP Google] 第 {i + 1} 次重试: isSubscribed={info.isSubscribed}, isExpired={info.isExpired}, expireDate={info.expireDate}");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 所有重试都失败了,使用降级方案
|
||||||
|
Debug.LogError($"[IAP Google] 无法获取订阅信息,使用降级方案");
|
||||||
|
bool fallbackSuccess = ProcessFallbackSubscription(productId);
|
||||||
|
if (fallbackSuccess)
|
||||||
|
{
|
||||||
|
DispatchPaySuccess(productId);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 降级也失败了,上报错误,不分发支付成功
|
||||||
|
Debug.LogError($"[IAP Google] 降级方案也失败,支付成功消息将不分发,请检查配置");
|
||||||
|
PurchasingManager.SendEventClickByName(productId, "open");
|
||||||
|
// 可选:向用户显示错误提示
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 处理订阅信息,设置VIP等级和过期时间
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>是否设置成功</returns>
|
||||||
|
private bool ProcessSubscriptionInfo(SubscriptionInfoLite info, string productId)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Debug.Log($"[IAP Google] VIP 订阅状态 ({productId}):");
|
||||||
|
Debug.Log($" isSubscribed = {info.isSubscribed}");
|
||||||
|
Debug.Log($" isExpired = {info.isExpired}");
|
||||||
|
Debug.Log($" expireDate = {info.expireDate}");
|
||||||
|
Debug.Log($" isAutoRenewing= {info.isAutoRenewing}");
|
||||||
|
|
||||||
|
// 获取VIP等级
|
||||||
|
int vipLevel = GetVipLevelByProductId(productId);
|
||||||
|
if (vipLevel <= 0)
|
||||||
|
{
|
||||||
|
Debug.LogError($"[IAP Google] 无法获取VIP等级,商品ID: {productId}");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取过期时间戳
|
||||||
|
long expireTimestamp = 0;
|
||||||
|
if (info.expireDate.Year > 1970 && info.expireDate.Year < 10000)
|
||||||
|
{
|
||||||
|
expireTimestamp = ((DateTimeOffset)info.expireDate).ToUnixTimeSeconds();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.LogWarning($"[IAP Google] 无效的到期时间: {info.expireDate},使用预估时间");
|
||||||
|
expireTimestamp = GetEstimatedExpireTimestamp(productId);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (expireTimestamp <= 0)
|
||||||
|
{
|
||||||
|
Debug.LogError($"[IAP Google] 无法获取有效的过期时间戳");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 保存数据(使用前后对比,确保设置成功)
|
||||||
|
int oldVipLevel = DataMgr.VipLevel.Value;
|
||||||
|
long oldExpireTime = DataMgr.VipExpirationTime.Value;
|
||||||
|
|
||||||
|
DataMgr.VipLevel.Value = Math.Max(DataMgr.VipLevel.Value, vipLevel);
|
||||||
|
DataMgr.VipExpirationTime.Value = Math.Max(DataMgr.VipExpirationTime.Value, expireTimestamp);
|
||||||
|
|
||||||
|
// 验证设置是否成功
|
||||||
|
bool vipLevelSuccess = DataMgr.VipLevel.Value >= vipLevel;
|
||||||
|
bool expireTimeSuccess = DataMgr.VipExpirationTime.Value >= expireTimestamp;
|
||||||
|
|
||||||
|
if (vipLevelSuccess && expireTimeSuccess)
|
||||||
|
{
|
||||||
|
Debug.Log($"[IAP Google] VIP设置成功 - 等级: {vipLevel} (原:{oldVipLevel}), 过期时间: {expireTimestamp} (原:{oldExpireTime})");
|
||||||
|
|
||||||
|
// 可选:触发VIP状态更新事件
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.LogError($"[IAP Google] VIP设置失败 - 等级设置: {vipLevelSuccess}, 过期时间设置: {expireTimeSuccess}");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.LogError($"[IAP Google] 处理订阅信息时发生异常: {e.Message}\n{e.StackTrace}");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 降级方案:当无法从商店获取订阅信息时,根据商品类型估算VIP信息
|
||||||
|
/// </summary>
|
||||||
|
private bool ProcessFallbackSubscription(string productId)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Debug.LogWarning($"[IAP Google] 执行降级方案: {productId}");
|
||||||
|
|
||||||
|
int vipLevel = GetVipLevelByProductId(productId);
|
||||||
|
if (vipLevel <= 0)
|
||||||
|
{
|
||||||
|
Debug.LogError($"[IAP Google] 降级方案失败 - 无法获取VIP等级");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
long expireTimestamp = GetEstimatedExpireTimestamp(productId);
|
||||||
|
if (expireTimestamp <= 0)
|
||||||
|
{
|
||||||
|
Debug.LogError($"[IAP Google] 降级方案失败 - 无法获取预估过期时间");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置VIP信息
|
||||||
|
DataMgr.VipLevel.Value = Math.Max(DataMgr.VipLevel.Value, vipLevel);
|
||||||
|
DataMgr.VipExpirationTime.Value = Math.Max(DataMgr.VipExpirationTime.Value, expireTimestamp);
|
||||||
|
|
||||||
|
Debug.Log($"[IAP Google] 降级方案成功 - 等级: {vipLevel}, 过期时间: {expireTimestamp}");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.LogError($"[IAP Google] 降级方案异常: {e.Message}");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取预估的过期时间戳
|
||||||
|
/// </summary>
|
||||||
|
private long GetEstimatedExpireTimestamp(string productId)
|
||||||
|
{
|
||||||
|
TimeSpan duration;
|
||||||
|
if (productId == PRODUCT_VIP_WEEK)
|
||||||
|
{
|
||||||
|
duration = TimeSpan.FromDays(7);
|
||||||
|
}
|
||||||
|
else if (productId == PRODUCT_VIP_MONTH)
|
||||||
|
{
|
||||||
|
duration = TimeSpan.FromDays(30);
|
||||||
|
}
|
||||||
|
else if (productId == PRODUCT_VIP_YEAR)
|
||||||
|
{
|
||||||
|
duration = TimeSpan.FromDays(365);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
duration = TimeSpan.FromDays(30);
|
||||||
|
}
|
||||||
|
|
||||||
|
var expireDate = DateTime.UtcNow.Add(duration);
|
||||||
|
return ((DateTimeOffset)expireDate).ToUnixTimeSeconds();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 分发支付成功消息(统一出口)
|
||||||
|
/// </summary>
|
||||||
|
private void DispatchPaySuccess(string productId)
|
||||||
|
{
|
||||||
|
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PayloadingUI_Close);
|
||||||
|
|
||||||
|
Debug.Log($"[IAP Google] 支付成功并完成发货: {productId}");
|
||||||
|
GameDispatcher.Instance.Dispatch(GameMsg.IAP_PAY_SUCCESS, productId);
|
||||||
|
PurchasingManager.SendEventClickByName(productId, "open");
|
||||||
|
PurchasingManager.SendEventClickByName(productId, "success");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>验证商品ID是否为已定义的有效商品</summary>
|
/// <summary>验证商品ID是否为已定义的有效商品</summary>
|
||||||
/// <param name="productId">商品ID</param>
|
/// <param name="productId">商品ID</param>
|
||||||
|
|||||||
@@ -38,8 +38,8 @@ public class LoveLegendRoot : MonoBehaviour
|
|||||||
App.InitApplication(SuperApplication.Instance);
|
App.InitApplication(SuperApplication.Instance);
|
||||||
NetworkManager.haveSimCard = HasSIMCard();
|
NetworkManager.haveSimCard = HasSIMCard();
|
||||||
|
|
||||||
MarkdownKit.Instance.LoadText("privacy", "https://official.piggyhydration.com/privacy.md");
|
MarkdownKit.Instance.LoadText("privacy", "https://www.ballcrushbest.com/privacy.md");
|
||||||
MarkdownKit.Instance.LoadText("user", "https://official.piggyhydration.com/user.md");
|
MarkdownKit.Instance.LoadText("user", "https://www.ballcrushbest.com/user.md");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string adInfoLabel = "";
|
private static string adInfoLabel = "";
|
||||||
|
|||||||
@@ -537,7 +537,7 @@ public class MaxPayManager
|
|||||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PayloadingUI_Close);
|
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PayloadingUI_Close);
|
||||||
// Debug.LogWarning("OnPurchaseFailedproduct:" + product.transactionID + " failureReason:" + failureReason);
|
// Debug.LogWarning("OnPurchaseFailedproduct:" + product.transactionID + " failureReason:" + failureReason);
|
||||||
|
|
||||||
BIManager.Instance.TrackPurchase(paydata.amount, paydata.currency, "1", paydata.sku, "paid_err");
|
// BIManager.Instance.TrackPurchase(paydata.amount, paydata.currency, "1", paydata.sku, "paid_err");
|
||||||
|
|
||||||
DOVirtual.DelayedCall(1, () => { SaveData.GetSaveObject().max_pay_object = null; });
|
DOVirtual.DelayedCall(1, () => { SaveData.GetSaveObject().max_pay_object = null; });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ namespace BallKingdomCrush
|
|||||||
{
|
{
|
||||||
CtrlCloseUI();
|
CtrlCloseUI();
|
||||||
});
|
});
|
||||||
LevelData = ConfigSystem.GetConfig<LevelUnlock>();
|
LevelData = ConfigSystem.GetLevelUnlockConfig();
|
||||||
// ui.list_.SetVirtual();
|
// ui.list_.SetVirtual();
|
||||||
// ui.list_.itemRenderer = RendererList;
|
// ui.list_.itemRenderer = RendererList;
|
||||||
// ui.list_.numItems = GameHelper.GetLevel() - 1;
|
// ui.list_.numItems = GameHelper.GetLevel() - 1;
|
||||||
@@ -197,29 +197,29 @@ namespace BallKingdomCrush
|
|||||||
{
|
{
|
||||||
if (levelunlock_.type == 0)
|
if (levelunlock_.type == 0)
|
||||||
{
|
{
|
||||||
if (levelunlock_.config_index >= ConfigSystem.GetConfig<FreeImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<FreeImageLibrary>().Count - 1;
|
if (levelunlock_.config_index >= ConfigSystem.GetFreeImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetFreeImageConfig().Count - 1;
|
||||||
FreeImageLibrary _leveldata = ConfigSystem.GetConfig<FreeImageLibrary>()[levelunlock_.config_index];
|
FreeImageLibrary _leveldata = ConfigSystem.GetFreeImageConfig()[levelunlock_.config_index];
|
||||||
TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
||||||
file_name = _leveldata.Name;
|
file_name = _leveldata.Name;
|
||||||
}
|
}
|
||||||
else if (levelunlock_.type == 1)
|
else if (levelunlock_.type == 1)
|
||||||
{
|
{
|
||||||
if (levelunlock_.config_index >= ConfigSystem.GetConfig<ADImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<ADImageLibrary>().Count - 1;
|
if (levelunlock_.config_index >= ConfigSystem.GetADImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetADImageConfig().Count - 1;
|
||||||
ADImageLibrary _leveldata = ConfigSystem.GetConfig<ADImageLibrary>()[levelunlock_.config_index];
|
ADImageLibrary _leveldata = ConfigSystem.GetADImageConfig()[levelunlock_.config_index];
|
||||||
TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
||||||
file_name = _leveldata.Name;
|
file_name = _leveldata.Name;
|
||||||
}
|
}
|
||||||
else if (levelunlock_.type == 2)
|
else if (levelunlock_.type == 2)
|
||||||
{
|
{
|
||||||
if (levelunlock_.config_index >= ConfigSystem.GetConfig<SpecialImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<SpecialImageLibrary>().Count - 1;
|
if (levelunlock_.config_index >= ConfigSystem.GetSpecialImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetSpecialImageConfig().Count - 1;
|
||||||
SpecialImageLibrary _leveldata = ConfigSystem.GetConfig<SpecialImageLibrary>()[levelunlock_.config_index];
|
SpecialImageLibrary _leveldata = ConfigSystem.GetSpecialImageConfig()[levelunlock_.config_index];
|
||||||
TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
||||||
file_name = _leveldata.Name;
|
file_name = _leveldata.Name;
|
||||||
}
|
}
|
||||||
else if (levelunlock_.type == 3)
|
else if (levelunlock_.type == 3)
|
||||||
{
|
{
|
||||||
if (levelunlock_.config_index >= ConfigSystem.GetConfig<VIPImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<VIPImageLibrary>().Count - 1;
|
if (levelunlock_.config_index >= ConfigSystem.GetVIPImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetVIPImageConfig().Count - 1;
|
||||||
VIPImageLibrary _leveldata = ConfigSystem.GetConfig<VIPImageLibrary>()[levelunlock_.config_index];
|
VIPImageLibrary _leveldata = ConfigSystem.GetVIPImageConfig()[levelunlock_.config_index];
|
||||||
TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
||||||
file_name = _leveldata.Name;
|
file_name = _leveldata.Name;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ namespace BallKingdomCrush
|
|||||||
{
|
{
|
||||||
_throttle = new Throttle(1f);
|
_throttle = new Throttle(1f);
|
||||||
|
|
||||||
LevelData = ConfigSystem.GetConfig<LevelUnlock>();
|
LevelData = ConfigSystem.GetLevelUnlockConfig();
|
||||||
ui.list_albums.SetVirtual();
|
ui.list_albums.SetVirtual();
|
||||||
ui.btn_close1.SetClick(() => { CtrlCloseUI(); });
|
ui.btn_close1.SetClick(() => { CtrlCloseUI(); });
|
||||||
InitView();
|
InitView();
|
||||||
@@ -352,29 +352,29 @@ namespace BallKingdomCrush
|
|||||||
|
|
||||||
if (levelunlock_.type == 0)
|
if (levelunlock_.type == 0)
|
||||||
{
|
{
|
||||||
if (levelunlock_.config_index >= ConfigSystem.GetConfig<FreeImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<FreeImageLibrary>().Count - 1;
|
if (levelunlock_.config_index >= ConfigSystem.GetFreeImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetFreeImageConfig().Count - 1;
|
||||||
FreeImageLibrary _leveldata = ConfigSystem.GetConfig<FreeImageLibrary>()[levelunlock_.config_index];
|
FreeImageLibrary _leveldata = ConfigSystem.GetFreeImageConfig()[levelunlock_.config_index];
|
||||||
TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
||||||
ImageName[index] = LevelData[index].Name;
|
ImageName[index] = LevelData[index].Name;
|
||||||
}
|
}
|
||||||
else if (levelunlock_.type == 1)
|
else if (levelunlock_.type == 1)
|
||||||
{
|
{
|
||||||
if (levelunlock_.config_index >= ConfigSystem.GetConfig<ADImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<ADImageLibrary>().Count - 1;
|
if (levelunlock_.config_index >= ConfigSystem.GetADImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetADImageConfig().Count - 1;
|
||||||
ADImageLibrary _leveldata = ConfigSystem.GetConfig<ADImageLibrary>()[levelunlock_.config_index];
|
ADImageLibrary _leveldata = ConfigSystem.GetADImageConfig()[levelunlock_.config_index];
|
||||||
TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
||||||
ImageName[index] = LevelData[index].Name;
|
ImageName[index] = LevelData[index].Name;
|
||||||
}
|
}
|
||||||
else if (levelunlock_.type == 2)
|
else if (levelunlock_.type == 2)
|
||||||
{
|
{
|
||||||
if (levelunlock_.config_index >= ConfigSystem.GetConfig<SpecialImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<SpecialImageLibrary>().Count - 1;
|
if (levelunlock_.config_index >= ConfigSystem.GetSpecialImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetSpecialImageConfig().Count - 1;
|
||||||
SpecialImageLibrary _leveldata = ConfigSystem.GetConfig<SpecialImageLibrary>()[levelunlock_.config_index];
|
SpecialImageLibrary _leveldata = ConfigSystem.GetSpecialImageConfig()[levelunlock_.config_index];
|
||||||
TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
||||||
ImageName[index] = LevelData[index].Name;
|
ImageName[index] = LevelData[index].Name;
|
||||||
}
|
}
|
||||||
else if (levelunlock_.type == 3)
|
else if (levelunlock_.type == 3)
|
||||||
{
|
{
|
||||||
if (levelunlock_.config_index >= ConfigSystem.GetConfig<VIPImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<VIPImageLibrary>().Count - 1;
|
if (levelunlock_.config_index >= ConfigSystem.GetVIPImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetVIPImageConfig().Count - 1;
|
||||||
VIPImageLibrary _leveldata = ConfigSystem.GetConfig<VIPImageLibrary>()[levelunlock_.config_index];
|
VIPImageLibrary _leveldata = ConfigSystem.GetVIPImageConfig()[levelunlock_.config_index];
|
||||||
TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
TextureHelper.SetImgLoader(item.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
||||||
ImageName[index] = LevelData[index].Name;
|
ImageName[index] = LevelData[index].Name;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ using FGUI.LG_Common;
|
|||||||
using SGModule.Common.Extensions;
|
using SGModule.Common.Extensions;
|
||||||
using SGModule.Common.Helper;
|
using SGModule.Common.Helper;
|
||||||
using SGModule.Net;
|
using SGModule.Net;
|
||||||
|
using UNSDK;
|
||||||
|
|
||||||
|
|
||||||
namespace BallKingdomCrush
|
namespace BallKingdomCrush
|
||||||
@@ -123,6 +124,8 @@ namespace BallKingdomCrush
|
|||||||
var loginModel = GameHelper.GetLoginModel();
|
var loginModel = GameHelper.GetLoginModel();
|
||||||
userUid = loginModel.Uid;
|
userUid = loginModel.Uid;
|
||||||
|
|
||||||
|
refrsh();
|
||||||
|
|
||||||
InitView();
|
InitView();
|
||||||
UpBtnCoin();
|
UpBtnCoin();
|
||||||
|
|
||||||
@@ -135,11 +138,11 @@ namespace BallKingdomCrush
|
|||||||
int secret = GameHelper.GetCommonModel().Secret;
|
int secret = GameHelper.GetCommonModel().Secret;
|
||||||
int lv1 = GameHelper.GetCommonModel().LivePreview;
|
int lv1 = GameHelper.GetCommonModel().LivePreview;
|
||||||
int lv2 = GameHelper.GetCommonModel().SecretPreview;
|
int lv2 = GameHelper.GetCommonModel().SecretPreview;
|
||||||
if (GameHelper.IsGiftSwitch() && (GameHelper.GetCommonModel().Live == 1) && (GameHelper.GetLevel() >= GameHelper.GetCommonModel().LivePreview))
|
if ( (GameHelper.GetCommonModel().Live == 1) && (GameHelper.GetLevel() >= GameHelper.GetCommonModel().LivePreview))
|
||||||
{
|
{
|
||||||
ui.btn_live.visible = true;
|
ui.btn_live.visible = true;
|
||||||
}
|
}
|
||||||
if (GameHelper.IsGiftSwitch() && (GameHelper.GetCommonModel().Secret == 1) && (GameHelper.GetLevel() >= GameHelper.GetCommonModel().SecretPreview))
|
if ( (GameHelper.GetCommonModel().Secret == 1) && (GameHelper.GetLevel() >= GameHelper.GetCommonModel().SecretPreview))
|
||||||
{
|
{
|
||||||
ui.btn_secret.visible = true;
|
ui.btn_secret.visible = true;
|
||||||
}
|
}
|
||||||
@@ -215,17 +218,17 @@ namespace BallKingdomCrush
|
|||||||
|
|
||||||
void Setbg(object a = null)
|
void Setbg(object a = null)
|
||||||
{
|
{
|
||||||
if (!GameHelper.IsGiftSwitch())
|
// if (!GameHelper.IsGiftSwitch())
|
||||||
{
|
// {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (GameHelper.GetLevel() - 1 < GameHelper.GetCommonModel().MultiModal)
|
if (GameHelper.GetLevel() - 1 < GameHelper.GetCommonModel().MultiModal)
|
||||||
{
|
{
|
||||||
int level_ = GameHelper.GetLevel() - 2;
|
int level_ = GameHelper.GetLevel() - 2;
|
||||||
if (level_ <= 0) level_ = 0;
|
if (level_ <= 0) level_ = 0;
|
||||||
if (level_ >= ConfigSystem.GetConfig<LevelUnlock>().Count) level_ = ConfigSystem.GetConfig<LevelUnlock>().Count - 1;
|
if (level_ >= ConfigSystem.GetLevelUnlockConfig().Count) level_ = ConfigSystem.GetLevelUnlockConfig().Count - 1;
|
||||||
TextureHelper.SetImgLoader(ui.bg_loader, ConfigSystem.GetConfig<LevelUnlock>()[level_].Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
TextureHelper.SetImgLoader(ui.bg_loader, ConfigSystem.GetLevelUnlockConfig()[level_].Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -234,26 +237,26 @@ namespace BallKingdomCrush
|
|||||||
{
|
{
|
||||||
if (levelunlock_.type == 0)
|
if (levelunlock_.type == 0)
|
||||||
{
|
{
|
||||||
if (levelunlock_.config_index >= ConfigSystem.GetConfig<FreeImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<FreeImageLibrary>().Count - 1;
|
if (levelunlock_.config_index >= ConfigSystem.GetFreeImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetFreeImageConfig().Count - 1;
|
||||||
FreeImageLibrary _leveldata = ConfigSystem.GetConfig<FreeImageLibrary>()[levelunlock_.config_index];
|
FreeImageLibrary _leveldata = ConfigSystem.GetFreeImageConfig()[levelunlock_.config_index];
|
||||||
TextureHelper.SetImgLoader(ui.bg_loader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
TextureHelper.SetImgLoader(ui.bg_loader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
||||||
}
|
}
|
||||||
else if (levelunlock_.type == 1)
|
else if (levelunlock_.type == 1)
|
||||||
{
|
{
|
||||||
if (levelunlock_.config_index >= ConfigSystem.GetConfig<ADImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<ADImageLibrary>().Count - 1;
|
if (levelunlock_.config_index >= ConfigSystem.GetADImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetADImageConfig().Count - 1;
|
||||||
ADImageLibrary _leveldata = ConfigSystem.GetConfig<ADImageLibrary>()[levelunlock_.config_index];
|
ADImageLibrary _leveldata = ConfigSystem.GetADImageConfig()[levelunlock_.config_index];
|
||||||
TextureHelper.SetImgLoader(ui.bg_loader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
TextureHelper.SetImgLoader(ui.bg_loader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
||||||
}
|
}
|
||||||
else if (levelunlock_.type == 2)
|
else if (levelunlock_.type == 2)
|
||||||
{
|
{
|
||||||
if (levelunlock_.config_index >= ConfigSystem.GetConfig<SpecialImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<SpecialImageLibrary>().Count - 1;
|
if (levelunlock_.config_index >= ConfigSystem.GetSpecialImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetSpecialImageConfig().Count - 1;
|
||||||
SpecialImageLibrary _leveldata = ConfigSystem.GetConfig<SpecialImageLibrary>()[levelunlock_.config_index];
|
SpecialImageLibrary _leveldata = ConfigSystem.GetSpecialImageConfig()[levelunlock_.config_index];
|
||||||
TextureHelper.SetImgLoader(ui.bg_loader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
TextureHelper.SetImgLoader(ui.bg_loader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
||||||
}
|
}
|
||||||
else if (levelunlock_.type == 3)
|
else if (levelunlock_.type == 3)
|
||||||
{
|
{
|
||||||
if (levelunlock_.config_index >= ConfigSystem.GetConfig<VIPImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<VIPImageLibrary>().Count - 1;
|
if (levelunlock_.config_index >= ConfigSystem.GetVIPImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetVIPImageConfig().Count - 1;
|
||||||
VIPImageLibrary _leveldata = ConfigSystem.GetConfig<VIPImageLibrary>()[levelunlock_.config_index];
|
VIPImageLibrary _leveldata = ConfigSystem.GetVIPImageConfig()[levelunlock_.config_index];
|
||||||
TextureHelper.SetImgLoader(ui.bg_loader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
TextureHelper.SetImgLoader(ui.bg_loader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -261,14 +264,14 @@ namespace BallKingdomCrush
|
|||||||
{
|
{
|
||||||
int level_ = GameHelper.GetLevel() - 2;
|
int level_ = GameHelper.GetLevel() - 2;
|
||||||
if (level_ < 0) level_ = 0;
|
if (level_ < 0) level_ = 0;
|
||||||
if (level_ >= ConfigSystem.GetConfig<LevelUnlock>().Count) level_ = ConfigSystem.GetConfig<LevelUnlock>().Count - 1;
|
if (level_ >= ConfigSystem.GetLevelUnlockConfig().Count) level_ = ConfigSystem.GetLevelUnlockConfig().Count - 1;
|
||||||
TextureHelper.SetImgLoader(ui.bg_loader, ConfigSystem.GetConfig<LevelUnlock>()[level_].Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
TextureHelper.SetImgLoader(ui.bg_loader, ConfigSystem.GetLevelUnlockConfig()[level_].Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// int level_ = GameHelper.GetLevel() - 2;
|
// int level_ = GameHelper.GetLevel() - 2;
|
||||||
// if (level_ < 0) level_ = 0;
|
// if (level_ < 0) level_ = 0;
|
||||||
// List<LevelUnlock> LevelData = ConfigSystem.GetConfig<LevelUnlock>();
|
// List<LevelUnlock> LevelData = ConfigSystem.GetLevelUnlockConfig();
|
||||||
|
|
||||||
// // 确保 level_ 不超过 LevelData 的最大索引
|
// // 确保 level_ 不超过 LevelData 的最大索引
|
||||||
// if (level_ >= LevelData.Count)
|
// if (level_ >= LevelData.Count)
|
||||||
@@ -380,6 +383,7 @@ namespace BallKingdomCrush
|
|||||||
GameDispatcher.Instance.AddListener(GameMsg.RefreshRedDot, RefreshRed);
|
GameDispatcher.Instance.AddListener(GameMsg.RefreshRedDot, RefreshRed);
|
||||||
GameDispatcher.Instance.AddListener(GameMsg.Gold_refresh, Chang101);
|
GameDispatcher.Instance.AddListener(GameMsg.Gold_refresh, Chang101);
|
||||||
GameDispatcher.Instance.AddListener(GameMsg.UpdateNoads, SetBtnAds);
|
GameDispatcher.Instance.AddListener(GameMsg.UpdateNoads, SetBtnAds);
|
||||||
|
GameDispatcher.Instance.AddListener(GameMsg.BuyVip, refrsh);
|
||||||
UICtrlDispatcher.Instance.AddListener(UICtrlMsg.AlubumUI_Close, Setbg);
|
UICtrlDispatcher.Instance.AddListener(UICtrlMsg.AlubumUI_Close, Setbg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -390,6 +394,7 @@ namespace BallKingdomCrush
|
|||||||
GameDispatcher.Instance.RemoveListener(GameMsg.RefreshRedDot, RefreshRed);
|
GameDispatcher.Instance.RemoveListener(GameMsg.RefreshRedDot, RefreshRed);
|
||||||
GameDispatcher.Instance.RemoveListener(GameMsg.Gold_refresh, Chang101);
|
GameDispatcher.Instance.RemoveListener(GameMsg.Gold_refresh, Chang101);
|
||||||
GameDispatcher.Instance.RemoveListener(GameMsg.UpdateNoads, SetBtnAds);
|
GameDispatcher.Instance.RemoveListener(GameMsg.UpdateNoads, SetBtnAds);
|
||||||
|
GameDispatcher.Instance.RemoveListener(GameMsg.BuyVip, refrsh);
|
||||||
UICtrlDispatcher.Instance.RemoveListener(UICtrlMsg.AlubumUI_Close, Setbg);
|
UICtrlDispatcher.Instance.RemoveListener(UICtrlMsg.AlubumUI_Close, Setbg);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@@ -435,7 +440,11 @@ namespace BallKingdomCrush
|
|||||||
checkThreeGift();
|
checkThreeGift();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
private void refrsh(object a = null)
|
||||||
|
{
|
||||||
|
var head = ui.btn_head as btn_head;
|
||||||
|
head.vip.selectedIndex = GameHelper.GetVipLevel();
|
||||||
|
}
|
||||||
|
|
||||||
private void InitData()
|
private void InitData()
|
||||||
{
|
{
|
||||||
@@ -461,12 +470,14 @@ namespace BallKingdomCrush
|
|||||||
btnSecretAnim.state.SetAnimation(0, "animation", true);
|
btnSecretAnim.state.SetAnimation(0, "animation", true);
|
||||||
|
|
||||||
var btnVip = ui.btn_vip as btn_vip;
|
var btnVip = ui.btn_vip as btn_vip;
|
||||||
var btnVipAnim = FXManager.Instance.SetFx<SkeletonAnimation>(btnVip.anim, Fx_Type.fx_btn_vip, ref closeCallback);
|
btnVip.t0.Play();
|
||||||
btnVipAnim.state.SetAnimation(0, "animation", true);
|
// var btnVipAnim = FXManager.Instance.SetFx<SkeletonAnimation>(btnVip.anim, Fx_Type.fx_btn_vip, ref closeCallback);
|
||||||
btnVip.anim.SetScale(1.5f, 1.5f);
|
// btnVipAnim.state.SetAnimation(0, "animation", true);
|
||||||
|
// btnVip.anim.SetScale(1.5f, 1.5f);
|
||||||
var btnAlbum = ui.btn_album as btn_albums;
|
var btnAlbum = ui.btn_album as btn_albums;
|
||||||
var btnAlbumAnim = FXManager.Instance.SetFx<SkeletonAnimation>(btnAlbum.anim, Fx_Type.fx_btn_album, ref closeCallback);
|
btnAlbum.t0.Play();
|
||||||
btnAlbumAnim.state.SetAnimation(0, "animation", true);
|
// var btnAlbumAnim = FXManager.Instance.SetFx<SkeletonAnimation>(btnAlbum.anim, Fx_Type.fx_btn_album, ref closeCallback);
|
||||||
|
// btnAlbumAnim.state.SetAnimation(0, "animation", true);
|
||||||
// btnAlbum.anim.SetScale(0.8f, 0.8f);
|
// btnAlbum.anim.SetScale(0.8f, 0.8f);
|
||||||
|
|
||||||
var btnLive = ui.btn_live as btn_live;
|
var btnLive = ui.btn_live as btn_live;
|
||||||
@@ -478,6 +489,7 @@ namespace BallKingdomCrush
|
|||||||
ui.btn_play.SetClick(OnClickPlay);
|
ui.btn_play.SetClick(OnClickPlay);
|
||||||
|
|
||||||
ui.btn_setting.SetClick(OnClickSetting);
|
ui.btn_setting.SetClick(OnClickSetting);
|
||||||
|
ui.btn_sign.SetClick(OnClickSign);
|
||||||
// ui.btn_secret.SetClick(OnClickSecretAlbums);
|
// ui.btn_secret.SetClick(OnClickSecretAlbums);
|
||||||
ui.btn_vip.SetClick(onClickVip);
|
ui.btn_vip.SetClick(onClickVip);
|
||||||
|
|
||||||
@@ -553,10 +565,10 @@ namespace BallKingdomCrush
|
|||||||
|
|
||||||
//ui.broadcast.visible = GameHelper.IsGiftSwitch();
|
//ui.broadcast.visible = GameHelper.IsGiftSwitch();
|
||||||
|
|
||||||
// if (GameHelper.IsGiftSwitch() || (ConfigSystem.GetCommonConf().WVswitch == 1))
|
if (!GameHelper.IsGiftSwitch())
|
||||||
// {
|
{
|
||||||
// ui.btn_h5.visible = false;
|
ui.btn_wv.visible = ConfigSystem.GetCommonConf().WVswitch == 1 && SdkConfigMgr.IsInitSuccess;
|
||||||
// }
|
}
|
||||||
|
|
||||||
var btnCoin = ui.btn_gold as com_gold;
|
var btnCoin = ui.btn_gold as com_gold;
|
||||||
btnCoin.text_gold.text = $"{DataMgr.Coin.Value:N0}";
|
btnCoin.text_gold.text = $"{DataMgr.Coin.Value:N0}";
|
||||||
@@ -716,6 +728,7 @@ namespace BallKingdomCrush
|
|||||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.MenuUI_Open, 1);
|
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.MenuUI_Open, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void onClickVip()
|
private void onClickVip()
|
||||||
{
|
{
|
||||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.VipClubViewUI_Open);
|
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.VipClubViewUI_Open);
|
||||||
|
|||||||
@@ -76,8 +76,8 @@ namespace BallKingdomCrush
|
|||||||
TextureHelper.ClearMaterialPool();
|
TextureHelper.ClearMaterialPool();
|
||||||
|
|
||||||
// 强制卸载未使用的资源
|
// 强制卸载未使用的资源
|
||||||
Resources.UnloadUnusedAssets();
|
// Resources.UnloadUnusedAssets();
|
||||||
MemoryManager.CleanMemoryMonitor();
|
// MemoryManager.CleanMemoryMonitor();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnBind()
|
protected override void OnBind()
|
||||||
@@ -90,7 +90,7 @@ namespace BallKingdomCrush
|
|||||||
|
|
||||||
protected override void OnOpenBefore(object args)
|
protected override void OnOpenBefore(object args)
|
||||||
{
|
{
|
||||||
LiveConfig = ConfigSystem.GetConfig<Live>();
|
LiveConfig = ConfigSystem.GetLiveConfig();
|
||||||
|
|
||||||
ui.list_.itemRenderer = RendererList;
|
ui.list_.itemRenderer = RendererList;
|
||||||
Debug.Log($"LiveConfig.Count==1=== {LiveConfig.Count}");
|
Debug.Log($"LiveConfig.Count==1=== {LiveConfig.Count}");
|
||||||
|
|||||||
@@ -246,7 +246,7 @@ namespace BallKingdomCrush
|
|||||||
player.audioOutputMode = VideoAudioOutputMode.None;
|
player.audioOutputMode = VideoAudioOutputMode.None;
|
||||||
|
|
||||||
// 从配置表取配置(这里还是 List,如果有 Id 字段可改成字典)
|
// 从配置表取配置(这里还是 List,如果有 Id 字段可改成字典)
|
||||||
LiveConfig = ConfigSystem.GetConfig<Live>()[index];
|
LiveConfig = ConfigSystem.GetLiveConfig()[index];
|
||||||
|
|
||||||
livedata_ = PreDownloadManager.GetLiveDataByIndex(LiveConfig, index);
|
livedata_ = PreDownloadManager.GetLiveDataByIndex(LiveConfig, index);
|
||||||
|
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ namespace BallKingdomCrush
|
|||||||
ui.btn_terms.menus.selectedIndex = btn_menu.Menus_terms;
|
ui.btn_terms.menus.selectedIndex = btn_menu.Menus_terms;
|
||||||
ui.btn_language.menus.selectedIndex = btn_menu.Menus_delete;
|
ui.btn_language.menus.selectedIndex = btn_menu.Menus_delete;
|
||||||
ui.btn_official.menus.selectedIndex = btn_menu.Menus_official;
|
ui.btn_official.menus.selectedIndex = btn_menu.Menus_official;
|
||||||
|
ui.btn_email.menus.selectedIndex = 5;
|
||||||
ui.btn_restore.menus.selectedIndex = 4;
|
ui.btn_restore.menus.selectedIndex = 4;
|
||||||
|
|
||||||
ui.btn_privacy.SetClick(() => { UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PrivacyUI_Open, 0); });
|
ui.btn_privacy.SetClick(() => { UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PrivacyUI_Open, 0); });
|
||||||
@@ -113,8 +114,11 @@ namespace BallKingdomCrush
|
|||||||
{
|
{
|
||||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LanguageViewUI_Open);
|
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LanguageViewUI_Open);
|
||||||
});
|
});
|
||||||
ui.btn_official.SetClick(() => { Application.OpenURL("https://official.piggyhydration.com/"); });
|
ui.btn_official.SetClick(() => { Application.OpenURL("https://www.ballcrushbest.com"); });
|
||||||
ui.btn_restore.SetClick(Restore);
|
ui.btn_restore.SetClick(Restore);
|
||||||
|
ui.btn_email.SetClick(() => {
|
||||||
|
GameHelper.OpenEmail();
|
||||||
|
});
|
||||||
|
|
||||||
SetUID();
|
SetUID();
|
||||||
SetVersion();
|
SetVersion();
|
||||||
|
|||||||
@@ -63,8 +63,8 @@ namespace BallKingdomCrush
|
|||||||
{
|
{
|
||||||
int level_ = GameHelper.GetLevel() - 1;
|
int level_ = GameHelper.GetLevel() - 1;
|
||||||
if (level_ < 0) level_ = 0;
|
if (level_ < 0) level_ = 0;
|
||||||
if (level_ >= ConfigSystem.GetConfig<LevelUnlock>().Count) level_ = ConfigSystem.GetConfig<LevelUnlock>().Count - 1;
|
if (level_ >= ConfigSystem.GetLevelUnlockConfig().Count) level_ = ConfigSystem.GetLevelUnlockConfig().Count - 1;
|
||||||
TextureHelper.SetImgLoader(ui.loader_bgimg, ConfigSystem.GetConfig<LevelUnlock>()[level_].Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
TextureHelper.SetImgLoader(ui.loader_bgimg, ConfigSystem.GetLevelUnlockConfig()[level_].Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -73,26 +73,26 @@ namespace BallKingdomCrush
|
|||||||
{
|
{
|
||||||
if (levelunlock_.type == 0)
|
if (levelunlock_.type == 0)
|
||||||
{
|
{
|
||||||
if (levelunlock_.config_index >= ConfigSystem.GetConfig<FreeImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<FreeImageLibrary>().Count - 1;
|
if (levelunlock_.config_index >= ConfigSystem.GetFreeImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetFreeImageConfig().Count - 1;
|
||||||
FreeImageLibrary _leveldata = ConfigSystem.GetConfig<FreeImageLibrary>()[levelunlock_.config_index];
|
FreeImageLibrary _leveldata = ConfigSystem.GetFreeImageConfig()[levelunlock_.config_index];
|
||||||
TextureHelper.SetImgLoader(ui.loader_bgimg, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
TextureHelper.SetImgLoader(ui.loader_bgimg, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
||||||
}
|
}
|
||||||
else if (levelunlock_.type == 1)
|
else if (levelunlock_.type == 1)
|
||||||
{
|
{
|
||||||
if (levelunlock_.config_index >= ConfigSystem.GetConfig<ADImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<ADImageLibrary>().Count - 1;
|
if (levelunlock_.config_index >= ConfigSystem.GetADImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetADImageConfig().Count - 1;
|
||||||
ADImageLibrary _leveldata = ConfigSystem.GetConfig<ADImageLibrary>()[levelunlock_.config_index];
|
ADImageLibrary _leveldata = ConfigSystem.GetADImageConfig()[levelunlock_.config_index];
|
||||||
TextureHelper.SetImgLoader(ui.loader_bgimg, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
TextureHelper.SetImgLoader(ui.loader_bgimg, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
||||||
}
|
}
|
||||||
else if (levelunlock_.type == 2)
|
else if (levelunlock_.type == 2)
|
||||||
{
|
{
|
||||||
if (levelunlock_.config_index >= ConfigSystem.GetConfig<SpecialImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<SpecialImageLibrary>().Count - 1;
|
if (levelunlock_.config_index >= ConfigSystem.GetSpecialImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetSpecialImageConfig().Count - 1;
|
||||||
SpecialImageLibrary _leveldata = ConfigSystem.GetConfig<SpecialImageLibrary>()[levelunlock_.config_index];
|
SpecialImageLibrary _leveldata = ConfigSystem.GetSpecialImageConfig()[levelunlock_.config_index];
|
||||||
TextureHelper.SetImgLoader(ui.loader_bgimg, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
TextureHelper.SetImgLoader(ui.loader_bgimg, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
||||||
}
|
}
|
||||||
else if (levelunlock_.type == 3)
|
else if (levelunlock_.type == 3)
|
||||||
{
|
{
|
||||||
if (levelunlock_.config_index >= ConfigSystem.GetConfig<VIPImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<VIPImageLibrary>().Count - 1;
|
if (levelunlock_.config_index >= ConfigSystem.GetVIPImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetVIPImageConfig().Count - 1;
|
||||||
VIPImageLibrary _leveldata = ConfigSystem.GetConfig<VIPImageLibrary>()[levelunlock_.config_index];
|
VIPImageLibrary _leveldata = ConfigSystem.GetVIPImageConfig()[levelunlock_.config_index];
|
||||||
TextureHelper.SetImgLoader(ui.loader_bgimg, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
TextureHelper.SetImgLoader(ui.loader_bgimg, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -100,8 +100,8 @@ namespace BallKingdomCrush
|
|||||||
{
|
{
|
||||||
int level_ = GameHelper.GetLevel() - 1;
|
int level_ = GameHelper.GetLevel() - 1;
|
||||||
if (level_ < 0) level_ = 0;
|
if (level_ < 0) level_ = 0;
|
||||||
if (level_ >= ConfigSystem.GetConfig<LevelUnlock>().Count) level_ = ConfigSystem.GetConfig<LevelUnlock>().Count - 1;
|
if (level_ >= ConfigSystem.GetLevelUnlockConfig().Count) level_ = ConfigSystem.GetLevelUnlockConfig().Count - 1;
|
||||||
TextureHelper.SetImgLoader(ui.loader_bgimg, ConfigSystem.GetConfig<LevelUnlock>()[level_].Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
TextureHelper.SetImgLoader(ui.loader_bgimg, ConfigSystem.GetLevelUnlockConfig()[level_].Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -115,7 +115,7 @@ namespace BallKingdomCrush
|
|||||||
Debug.Log(GetNextSpecialLevel());
|
Debug.Log(GetNextSpecialLevel());
|
||||||
next_level = GetNextSpecialLevel();
|
next_level = GetNextSpecialLevel();
|
||||||
|
|
||||||
var levelUnlock_ = ConfigSystem.GetConfig<LevelUnlock>()[next_level];
|
var levelUnlock_ = ConfigSystem.GetLevelUnlockConfig()[next_level];
|
||||||
if (levelUnlock_.LeveType == 1)
|
if (levelUnlock_.LeveType == 1)
|
||||||
ui.text_levelType.text = "Special level";
|
ui.text_levelType.text = "Special level";
|
||||||
else if (levelUnlock_.LeveType == 2) ui.text_levelType.text = "VIP level";
|
else if (levelUnlock_.LeveType == 2) ui.text_levelType.text = "VIP level";
|
||||||
@@ -440,29 +440,29 @@ namespace BallKingdomCrush
|
|||||||
{
|
{
|
||||||
if (levelunlock_.type == 0)
|
if (levelunlock_.type == 0)
|
||||||
{
|
{
|
||||||
if (levelunlock_.config_index >= ConfigSystem.GetConfig<FreeImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<FreeImageLibrary>().Count - 1;
|
if (levelunlock_.config_index >= ConfigSystem.GetFreeImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetFreeImageConfig().Count - 1;
|
||||||
FreeImageLibrary _leveldata = ConfigSystem.GetConfig<FreeImageLibrary>()[levelunlock_.config_index];
|
FreeImageLibrary _leveldata = ConfigSystem.GetFreeImageConfig()[levelunlock_.config_index];
|
||||||
TextureHelper.SetImgLoader(ui.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
TextureHelper.SetImgLoader(ui.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
||||||
file_name = _leveldata.Name;
|
file_name = _leveldata.Name;
|
||||||
}
|
}
|
||||||
else if (levelunlock_.type == 1)
|
else if (levelunlock_.type == 1)
|
||||||
{
|
{
|
||||||
if (levelunlock_.config_index >= ConfigSystem.GetConfig<ADImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<ADImageLibrary>().Count - 1;
|
if (levelunlock_.config_index >= ConfigSystem.GetADImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetADImageConfig().Count - 1;
|
||||||
ADImageLibrary _leveldata = ConfigSystem.GetConfig<ADImageLibrary>()[levelunlock_.config_index];
|
ADImageLibrary _leveldata = ConfigSystem.GetADImageConfig()[levelunlock_.config_index];
|
||||||
TextureHelper.SetImgLoader(ui.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
TextureHelper.SetImgLoader(ui.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
||||||
file_name = _leveldata.Name;
|
file_name = _leveldata.Name;
|
||||||
}
|
}
|
||||||
else if (levelunlock_.type == 2)
|
else if (levelunlock_.type == 2)
|
||||||
{
|
{
|
||||||
if (levelunlock_.config_index >= ConfigSystem.GetConfig<SpecialImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<SpecialImageLibrary>().Count - 1;
|
if (levelunlock_.config_index >= ConfigSystem.GetSpecialImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetSpecialImageConfig().Count - 1;
|
||||||
SpecialImageLibrary _leveldata = ConfigSystem.GetConfig<SpecialImageLibrary>()[levelunlock_.config_index];
|
SpecialImageLibrary _leveldata = ConfigSystem.GetSpecialImageConfig()[levelunlock_.config_index];
|
||||||
TextureHelper.SetImgLoader(ui.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
TextureHelper.SetImgLoader(ui.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
||||||
file_name = _leveldata.Name;
|
file_name = _leveldata.Name;
|
||||||
}
|
}
|
||||||
else if (levelunlock_.type == 3)
|
else if (levelunlock_.type == 3)
|
||||||
{
|
{
|
||||||
if (levelunlock_.config_index >= ConfigSystem.GetConfig<VIPImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<VIPImageLibrary>().Count - 1;
|
if (levelunlock_.config_index >= ConfigSystem.GetVIPImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetVIPImageConfig().Count - 1;
|
||||||
VIPImageLibrary _leveldata = ConfigSystem.GetConfig<VIPImageLibrary>()[levelunlock_.config_index];
|
VIPImageLibrary _leveldata = ConfigSystem.GetVIPImageConfig()[levelunlock_.config_index];
|
||||||
TextureHelper.SetImgLoader(ui.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
TextureHelper.SetImgLoader(ui.com_loader.GetChild("loader") as GLoader, _leveldata.Name, null, "LevelAlbums/", FolderNames.AlbumName);
|
||||||
file_name = _leveldata.Name;
|
file_name = _leveldata.Name;
|
||||||
}
|
}
|
||||||
@@ -586,7 +586,7 @@ namespace BallKingdomCrush
|
|||||||
|
|
||||||
loader_list.Clear();
|
loader_list.Clear();
|
||||||
|
|
||||||
MemoryManager.CleanMemoryMonitor();
|
// MemoryManager.CleanMemoryMonitor();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnBind()
|
protected override void OnBind()
|
||||||
@@ -606,7 +606,7 @@ namespace BallKingdomCrush
|
|||||||
successData_.ch_number = (int)successData_.ch_number;
|
successData_.ch_number = (int)successData_.ch_number;
|
||||||
|
|
||||||
// 修改后的代码
|
// 修改后的代码
|
||||||
var levelDataList = ConfigSystem.GetConfig<LevelUnlock>();
|
var levelDataList = ConfigSystem.GetLevelUnlockConfig();
|
||||||
var levelIndex = successData_.level - 1;
|
var levelIndex = successData_.level - 1;
|
||||||
|
|
||||||
// 确保索引不超出范围,如果超出则使用最后一个元素
|
// 确保索引不超出范围,如果超出则使用最后一个元素
|
||||||
@@ -656,7 +656,7 @@ namespace BallKingdomCrush
|
|||||||
private int GetNextSpecialLevel()
|
private int GetNextSpecialLevel()
|
||||||
{
|
{
|
||||||
var now_level = successData_.level;
|
var now_level = successData_.level;
|
||||||
var list_ = ConfigSystem.GetConfig<LevelUnlock>();
|
var list_ = ConfigSystem.GetLevelUnlockConfig();
|
||||||
for (var i = now_level; i < list_.Count; i++)
|
for (var i = now_level; i < list_.Count; i++)
|
||||||
if (list_[i].LeveType != 0)
|
if (list_[i].LeveType != 0)
|
||||||
return i;
|
return i;
|
||||||
|
|||||||
@@ -60,9 +60,9 @@ namespace BallKingdomCrush
|
|||||||
{
|
{
|
||||||
Debug.Log($"open 1 game------------------{GameHelper.GetLevel() - 1}");
|
Debug.Log($"open 1 game------------------{GameHelper.GetLevel() - 1}");
|
||||||
|
|
||||||
if (GameHelper.GetLevel() - 1 < ConfigSystem.GetConfig<LevelUnlock>().Count)
|
if (GameHelper.GetLevel() - 1 < ConfigSystem.GetLevelUnlockConfig().Count)
|
||||||
{
|
{
|
||||||
LevelUnlock levelUnlock_ = ConfigSystem.GetConfig<LevelUnlock>()[GameHelper.GetLevel() - 1];
|
LevelUnlock levelUnlock_ = ConfigSystem.GetLevelUnlockConfig()[GameHelper.GetLevel() - 1];
|
||||||
|
|
||||||
Debug.Log($"open 2 game------------------{levelUnlock_.LeveType}");
|
Debug.Log($"open 2 game------------------{levelUnlock_.LeveType}");
|
||||||
if (levelUnlock_.LeveType != 0)
|
if (levelUnlock_.LeveType != 0)
|
||||||
|
|||||||
@@ -118,10 +118,10 @@ namespace BallKingdomCrush
|
|||||||
|
|
||||||
protected override void OnOpenBefore(object args)
|
protected override void OnOpenBefore(object args)
|
||||||
{
|
{
|
||||||
// #if UNITY_ANDROID && !UNITY_EDITOR
|
#if UNITY_ANDROID
|
||||||
// ui.btn_add.x += 20;
|
ui.btn_add.y += 25;
|
||||||
// ui.btn_add.y += 15;
|
#endif
|
||||||
// #endif
|
|
||||||
if (Screen.safeArea.y != 0)
|
if (Screen.safeArea.y != 0)
|
||||||
{
|
{
|
||||||
ui.btn_gold.y += 68;
|
ui.btn_gold.y += 68;
|
||||||
@@ -244,7 +244,7 @@ namespace BallKingdomCrush
|
|||||||
// if (!GameHelper.IsGiftSwitch())
|
// if (!GameHelper.IsGiftSwitch())
|
||||||
// {
|
// {
|
||||||
// }
|
// }
|
||||||
// LevelData = ConfigSystem.GetConfig<LevelUnlock>()[successData_.level - 1];
|
// LevelData = ConfigSystem.GetLevelUnlockConfig()[successData_.level - 1];
|
||||||
ui.btn_add.t0.Play();
|
ui.btn_add.t0.Play();
|
||||||
// if (GameHelper.IsGiftSwitch() && GameHelper.GetCommonModel().Assitant == 1 && GameHelper.GetLevel() >= GameHelper.GetCommonModel().AssitantPreview)
|
// if (GameHelper.IsGiftSwitch() && GameHelper.GetCommonModel().Assitant == 1 && GameHelper.GetLevel() >= GameHelper.GetCommonModel().AssitantPreview)
|
||||||
// {
|
// {
|
||||||
@@ -265,8 +265,8 @@ namespace BallKingdomCrush
|
|||||||
|
|
||||||
|
|
||||||
var btnAlbum = ui.btn_album as btn_albums;
|
var btnAlbum = ui.btn_album as btn_albums;
|
||||||
var btnAlbumAnim = FXManager.Instance.SetFx<SkeletonAnimation>(btnAlbum.anim, Fx_Type.fx_btn_album, ref closeCallback);
|
// var btnAlbumAnim = FXManager.Instance.SetFx<SkeletonAnimation>(btnAlbum.anim, Fx_Type.fx_btn_album, ref closeCallback);
|
||||||
btnAlbumAnim.state.SetAnimation(0, "animation", true);
|
// btnAlbumAnim.state.SetAnimation(0, "animation", true);
|
||||||
btnAlbum.t0.Play();
|
btnAlbum.t0.Play();
|
||||||
RefreshRed();
|
RefreshRed();
|
||||||
}
|
}
|
||||||
@@ -391,12 +391,14 @@ namespace BallKingdomCrush
|
|||||||
btnSecretAnim.state.SetAnimation(0, "animation", true);
|
btnSecretAnim.state.SetAnimation(0, "animation", true);
|
||||||
|
|
||||||
var btnVip = ui.btn_vip as btn_vip;
|
var btnVip = ui.btn_vip as btn_vip;
|
||||||
var btnVipAnim = FXManager.Instance.SetFx<SkeletonAnimation>(btnVip.anim, Fx_Type.fx_btn_vip, ref closeCallback);
|
btnVip.t0.Play();
|
||||||
btnVipAnim.state.SetAnimation(0, "animation", true);
|
// var btnVipAnim = FXManager.Instance.SetFx<SkeletonAnimation>(btnVip.anim, Fx_Type.fx_btn_vip, ref closeCallback);
|
||||||
btnVip.anim.SetScale(1.5f, 1.5f);
|
// btnVipAnim.state.SetAnimation(0, "animation", true);
|
||||||
|
// btnVip.anim.SetScale(1.5f, 1.5f);
|
||||||
var btnAlbum = ui.btn_album as btn_albums;
|
var btnAlbum = ui.btn_album as btn_albums;
|
||||||
var btnAlbumAnim = FXManager.Instance.SetFx<SkeletonAnimation>(btnAlbum.anim, Fx_Type.fx_btn_album, ref closeCallback);
|
btnAlbum.t0.Play();
|
||||||
btnAlbumAnim.state.SetAnimation(0, "animation", true);
|
// var btnAlbumAnim = FXManager.Instance.SetFx<SkeletonAnimation>(btnAlbum.anim, Fx_Type.fx_btn_album, ref closeCallback);
|
||||||
|
// btnAlbumAnim.state.SetAnimation(0, "animation", true);
|
||||||
|
|
||||||
var btnLive = ui.btn_live as btn_live;
|
var btnLive = ui.btn_live as btn_live;
|
||||||
var btnLiveAnim = FXManager.Instance.SetFx<SkeletonAnimation>(btnLive.anim, Fx_Type.fx_btn_live, ref closeCallback);
|
var btnLiveAnim = FXManager.Instance.SetFx<SkeletonAnimation>(btnLive.anim, Fx_Type.fx_btn_live, ref closeCallback);
|
||||||
@@ -434,7 +436,11 @@ namespace BallKingdomCrush
|
|||||||
ui.btn_back.SetClick(BackFunc);
|
ui.btn_back.SetClick(BackFunc);
|
||||||
ui.btn_refresh.SetClick(RefreshFunc);
|
ui.btn_refresh.SetClick(RefreshFunc);
|
||||||
|
|
||||||
ui.btn_wv.visible = GameHelper.IsGiftSwitch() && SdkConfigMgr.IsInitSuccess;
|
if (!GameHelper.IsGiftSwitch())
|
||||||
|
{
|
||||||
|
ui.btn_wv.visible = ConfigSystem.GetCommonConf().WVswitch == 1 && SdkConfigMgr.IsInitSuccess;
|
||||||
|
}
|
||||||
|
|
||||||
ui.btn_wv.SetClick(() =>
|
ui.btn_wv.SetClick(() =>
|
||||||
{
|
{
|
||||||
CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb);
|
CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb);
|
||||||
@@ -590,54 +596,57 @@ namespace BallKingdomCrush
|
|||||||
}
|
}
|
||||||
public void Setbg()
|
public void Setbg()
|
||||||
{
|
{
|
||||||
Debug.Log("?????????????chongxinshezhi" + GameHelper.GetLevel());
|
// Debug.Log("?????????????chongxinshezhi" + GameHelper.GetLevel());
|
||||||
if (GameHelper.IsGiftSwitch())
|
if (true)
|
||||||
{
|
{
|
||||||
if (UIManager.Instance.IsExistUI(UIConst.NewEndUI) || UIManager.Instance.IsExistUI(UIConst.UnlockLevelNewUI)) return;
|
if (UIManager.Instance.IsExistUI(UIConst.NewEndUI) || UIManager.Instance.IsExistUI(UIConst.UnlockLevelNewUI)) return;
|
||||||
if (GameHelper.GetLevel() < GameHelper.GetCommonModel().MultiModal)
|
if (GameHelper.GetLevel() < GameHelper.GetCommonModel().MultiModal)
|
||||||
{
|
{
|
||||||
TextureHelper.setGamebg(ConfigSystem.GetConfig<LevelUnlock>()[GameHelper.GetLevel() - 1].Name);
|
TextureHelper.setGamebg(ConfigSystem.GetLevelUnlockConfig()[GameHelper.GetLevel() - 1].Name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Levelunlock levelunlock_ = DataMgr.LevelUnlockListNew.Value.FirstOrDefault(x => x.level_ == GameHelper.GetLevel());
|
Levelunlock levelunlock_ = DataMgr.LevelUnlockListNew.Value.FirstOrDefault(x => x.level_ == GameHelper.GetLevel());
|
||||||
if (levelunlock_ != null)
|
if (levelunlock_ != null)
|
||||||
{
|
{
|
||||||
|
Debug.Log($"levelunlock_0000======{levelunlock_.config_index}");
|
||||||
if (levelunlock_.type == 0)
|
if (levelunlock_.type == 0)
|
||||||
{
|
{
|
||||||
if (levelunlock_.config_index >= ConfigSystem.GetConfig<FreeImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<FreeImageLibrary>().Count - 1;
|
if (levelunlock_.config_index >= ConfigSystem.GetFreeImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetFreeImageConfig().Count - 1;
|
||||||
FreeImageLibrary _leveldata = ConfigSystem.GetConfig<FreeImageLibrary>()[levelunlock_.config_index];
|
Debug.Log($"levelunlock_1111======{levelunlock_.config_index}");
|
||||||
|
|
||||||
|
FreeImageLibrary _leveldata = ConfigSystem.GetFreeImageConfig()[levelunlock_.config_index];
|
||||||
TextureHelper.setGamebg(_leveldata.Name);
|
TextureHelper.setGamebg(_leveldata.Name);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (levelunlock_.type == 1)
|
else if (levelunlock_.type == 1)
|
||||||
{
|
{
|
||||||
if (levelunlock_.config_index >= ConfigSystem.GetConfig<ADImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<ADImageLibrary>().Count - 1;
|
if (levelunlock_.config_index >= ConfigSystem.GetADImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetADImageConfig().Count - 1;
|
||||||
ADImageLibrary _leveldata = ConfigSystem.GetConfig<ADImageLibrary>()[levelunlock_.config_index];
|
ADImageLibrary _leveldata = ConfigSystem.GetADImageConfig()[levelunlock_.config_index];
|
||||||
TextureHelper.setGamebg(_leveldata.Name);
|
TextureHelper.setGamebg(_leveldata.Name);
|
||||||
}
|
}
|
||||||
else if (levelunlock_.type == 2)
|
else if (levelunlock_.type == 2)
|
||||||
{
|
{
|
||||||
if (levelunlock_.config_index >= ConfigSystem.GetConfig<SpecialImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<SpecialImageLibrary>().Count - 1;
|
if (levelunlock_.config_index >= ConfigSystem.GetSpecialImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetSpecialImageConfig().Count - 1;
|
||||||
SpecialImageLibrary _leveldata = ConfigSystem.GetConfig<SpecialImageLibrary>()[levelunlock_.config_index];
|
SpecialImageLibrary _leveldata = ConfigSystem.GetSpecialImageConfig()[levelunlock_.config_index];
|
||||||
TextureHelper.setGamebg(_leveldata.Name);
|
TextureHelper.setGamebg(_leveldata.Name);
|
||||||
}
|
}
|
||||||
else if (levelunlock_.type == 3)
|
else if (levelunlock_.type == 3)
|
||||||
{
|
{
|
||||||
if (levelunlock_.config_index >= ConfigSystem.GetConfig<VIPImageLibrary>().Count) levelunlock_.config_index = ConfigSystem.GetConfig<VIPImageLibrary>().Count - 1;
|
if (levelunlock_.config_index >= ConfigSystem.GetVIPImageConfig().Count) levelunlock_.config_index = ConfigSystem.GetVIPImageConfig().Count - 1;
|
||||||
VIPImageLibrary _leveldata = ConfigSystem.GetConfig<VIPImageLibrary>()[levelunlock_.config_index];
|
VIPImageLibrary _leveldata = ConfigSystem.GetVIPImageConfig()[levelunlock_.config_index];
|
||||||
TextureHelper.setGamebg(_leveldata.Name);
|
TextureHelper.setGamebg(_leveldata.Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (GameHelper.GetLevel() - 1 < ConfigSystem.GetConfig<LevelUnlock>().Count)
|
if (GameHelper.GetLevel() - 1 < ConfigSystem.GetLevelUnlockConfig().Count)
|
||||||
{
|
{
|
||||||
TextureHelper.setGamebg(ConfigSystem.GetConfig<LevelUnlock>()[GameHelper.GetLevel() - 1].Name);
|
TextureHelper.setGamebg(ConfigSystem.GetLevelUnlockConfig()[GameHelper.GetLevel() - 1].Name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TextureHelper.setGamebg(ConfigSystem.GetConfig<LevelUnlock>()[ConfigSystem.GetConfig<LevelUnlock>().Count - 1].Name);
|
TextureHelper.setGamebg(ConfigSystem.GetLevelUnlockConfig()[ConfigSystem.GetLevelUnlockConfig().Count - 1].Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,11 @@ using AppsFlyerSDK;
|
|||||||
using FairyGUI;
|
using FairyGUI;
|
||||||
using IgnoreOPS;
|
using IgnoreOPS;
|
||||||
using SGModule.Common.Extensions;
|
using SGModule.Common.Extensions;
|
||||||
|
using SGModule.GooglePay;
|
||||||
using SGModule.Net;
|
using SGModule.Net;
|
||||||
using SGModule.NetKit;
|
using SGModule.NetKit;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using ZrZYFo6bYXYM71YyLSDK;
|
||||||
|
|
||||||
namespace BallKingdomCrush
|
namespace BallKingdomCrush
|
||||||
{
|
{
|
||||||
@@ -291,10 +293,10 @@ namespace BallKingdomCrush
|
|||||||
int startIndex = "secret_albnums".Length;
|
int startIndex = "secret_albnums".Length;
|
||||||
string suffix = type[startIndex..]; // 截取 "gold" 后的所有字符
|
string suffix = type[startIndex..]; // 截取 "gold" 后的所有字符
|
||||||
int suffix_num = int.Parse(suffix);
|
int suffix_num = int.Parse(suffix);
|
||||||
var model = ConfigSystem.GetConfig<SecretAlbums>()[suffix_num];
|
var model = ConfigSystem.GetSecretAlbumsConfig()[suffix_num];
|
||||||
if (model.PayType == (int)UnlockPayType.Pay)
|
if (model.PayType == (int)UnlockPayType.Pay)
|
||||||
{
|
{
|
||||||
purch_number = ConfigSystem.GetConfig<SecretAlbums>()[suffix_num].DiscountPrice.ToString();
|
purch_number = ConfigSystem.GetSecretAlbumsConfig()[suffix_num].DiscountPrice.ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PayloadingUI_Close);
|
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PayloadingUI_Close);
|
||||||
@@ -303,20 +305,42 @@ namespace BallKingdomCrush
|
|||||||
{
|
{
|
||||||
var payType = MaxPayManager.isOfficialPay ? 0 : 1;
|
var payType = MaxPayManager.isOfficialPay ? 0 : 1;
|
||||||
// 付费上报BI
|
// 付费上报BI
|
||||||
BIManager.Instance.TrackPurchase(purch_number.As<double>(), "USD", payType.ToString(), type, "paid");
|
// BIManager.Instance.TrackPurchase(purch_number.As<double>(), "USD", payType.ToString(), type, "paid");
|
||||||
|
|
||||||
Debug.Log("付费收益上报AF----------- " + revenue);
|
// Debug.Log("付费收益上报AF----------- " + revenue);
|
||||||
adCallbackInfo.Clear();
|
// adCallbackInfo.Clear();
|
||||||
adCallbackInfo.Add("appsflyer_id", AppsFlyer.getAppsFlyerId());
|
// adCallbackInfo.Add("appsflyer_id", AppsFlyer.getAppsFlyerId());
|
||||||
adCallbackInfo.Add("customer_user_id", GameHelper.GetLoginModel().Uid.ToString());
|
// adCallbackInfo.Add("customer_user_id", GameHelper.GetLoginModel().Uid.ToString());
|
||||||
adCallbackInfo.Add("af_currency", "USD");
|
// adCallbackInfo.Add("af_currency", "USD");
|
||||||
adCallbackInfo.Add("af_revenue", revenue.ToString(CultureInfo.InvariantCulture));
|
// adCallbackInfo.Add("af_revenue", revenue.ToString(CultureInfo.InvariantCulture));
|
||||||
AppsFlyer.sendEvent("af_purchase", adCallbackInfo);
|
// AppsFlyer.sendEvent("af_purchase", adCallbackInfo);
|
||||||
|
|
||||||
FireBaseManger.OnPayRevenueEvent(purch_number.As<double>());
|
// FireBaseManger.OnPayRevenueEvent(purch_number.As<double>());
|
||||||
|
|
||||||
|
// ZrZYFo6bYXYM71YyLSDKCONTROLLER.Instance.Track("af_purchase", new Dictionary<string, string>()
|
||||||
|
// {
|
||||||
|
// {"evt1", "1"},
|
||||||
|
// });
|
||||||
|
|
||||||
TrackKit.SendEvent(AfPurchaseTrack.Event, AfPurchaseTrack.Property.af_revenue,(int)(purch_number.As<decimal>() * 10000));
|
TrackKit.SendEvent(AfPurchaseTrack.Event, AfPurchaseTrack.Property.af_revenue,(int)(purch_number.As<decimal>() * 10000));
|
||||||
|
var payData = new GooglePayData
|
||||||
|
{
|
||||||
|
sku = type,
|
||||||
|
currency = "USD",
|
||||||
|
amount = (int)(purch_number.As<decimal>() * 100),
|
||||||
|
isCompleted = true
|
||||||
|
};
|
||||||
|
|
||||||
|
//上报给服务器,用来做数据分析,之前创建订单接口改的
|
||||||
|
GooglePayNet.GooglePayCreate<GooglePayData>(payData, (response) =>
|
||||||
|
{
|
||||||
|
Debug.Log($"[付费收益] Purchase-----type--{type}----{response.IsSuccess}");
|
||||||
|
|
||||||
|
if (response.IsSuccess)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ namespace BallKingdomCrush
|
|||||||
|
|
||||||
// 强制卸载未使用的资源
|
// 强制卸载未使用的资源
|
||||||
// Resources.UnloadUnusedAssets();
|
// Resources.UnloadUnusedAssets();
|
||||||
MemoryManager.CleanMemoryMonitor();
|
// MemoryManager.CleanMemoryMonitor();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnBind()
|
protected override void OnBind()
|
||||||
@@ -86,7 +86,7 @@ namespace BallKingdomCrush
|
|||||||
var eventName = GameHelper.IsAdModelOfPay() ? ADEventTrack.AD_Event : ADEventTrack.MaxPayEvent;
|
var eventName = GameHelper.IsAdModelOfPay() ? ADEventTrack.AD_Event : ADEventTrack.MaxPayEvent;
|
||||||
TrackKit.SendEvent(eventName, ADEventTrack.Property.secret_albums_show);
|
TrackKit.SendEvent(eventName, ADEventTrack.Property.secret_albums_show);
|
||||||
|
|
||||||
_secretData = ConfigSystem.GetConfig<SecretAlbums>();
|
_secretData = ConfigSystem.GetSecretAlbumsConfig();
|
||||||
InitView();
|
InitView();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ namespace BallKingdomCrush
|
|||||||
loader_list.Clear();
|
loader_list.Clear();
|
||||||
|
|
||||||
// 强制卸载未使用的资源
|
// 强制卸载未使用的资源
|
||||||
Resources.UnloadUnusedAssets();
|
// Resources.UnloadUnusedAssets();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnBind()
|
protected override void OnBind()
|
||||||
|
|||||||
@@ -144,12 +144,10 @@ namespace BallKingdomCrush
|
|||||||
{
|
{
|
||||||
string type = (string)str;
|
string type = (string)str;
|
||||||
|
|
||||||
if (type.StartsWith("buy_gold"))
|
if (PurchasingManager._shopProductMap.TryGetValue(type, out var shopId))
|
||||||
{
|
{
|
||||||
int startIndex = "buy_gold".Length;
|
int suffix_num = int.Parse(shopId);
|
||||||
string suffix = type[startIndex..]; // 截取 "gold" 后的所有字符
|
Debug.Log($"购买金币成功 id===={suffix_num}");
|
||||||
int suffix_num = int.Parse(suffix);
|
|
||||||
|
|
||||||
SaveData.GetSaveObject()._goldtime[suffix_num] = (int)GameHelper.GetNowTime();
|
SaveData.GetSaveObject()._goldtime[suffix_num] = (int)GameHelper.GetNowTime();
|
||||||
SaveData.SaveDataFunc();
|
SaveData.SaveDataFunc();
|
||||||
GetAward(list[suffix_num].Actual_coins, suffix_num);
|
GetAward(list[suffix_num].Actual_coins, suffix_num);
|
||||||
@@ -321,7 +319,7 @@ namespace BallKingdomCrush
|
|||||||
{
|
{
|
||||||
ad_count = AdExchangeManager.Instance.GetCeilingNeedAds(_type),
|
ad_count = AdExchangeManager.Instance.GetCeilingNeedAds(_type),
|
||||||
type = _type,
|
type = _type,
|
||||||
shopName = $"buy_gold{index}"
|
shopName = _type
|
||||||
};
|
};
|
||||||
AdExchangeManager.Instance.Exchange(test);
|
AdExchangeManager.Instance.Exchange(test);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ namespace BallKingdomCrush
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ui.close.SetClick(()=>{});
|
||||||
ui.close.SetClick(CtrlCloseUI);
|
ui.close.SetClick(CtrlCloseUI);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -146,14 +146,14 @@ namespace BallKingdomCrush
|
|||||||
btnSign_new.line.visible = true;
|
btnSign_new.line.visible = true;
|
||||||
btnSign.SetClick(() =>
|
btnSign.SetClick(() =>
|
||||||
{
|
{
|
||||||
var startPos = GameHelper.GetUICenterPosition(btnSign);
|
// var startPos = GameHelper.GetUICenterPosition(btnSign);
|
||||||
btnSign_new.status.selectedIndex = btn_sign.Status_reward;
|
// btnSign_new.status.selectedIndex = btn_sign.Status_reward;
|
||||||
btnSign.onClick.Clear();
|
// btnSign.onClick.Clear();
|
||||||
btnSign.touchable = false;
|
// btnSign.touchable = false;
|
||||||
// sk.SetActive(false);
|
// // sk.SetActive(false);
|
||||||
btnSign_new.line.visible = false;
|
// btnSign_new.line.visible = false;
|
||||||
|
//
|
||||||
GetSignInReward(reward, startPos, btnSign_new);
|
// GetSignInReward(reward, startPos, btnSign_new);
|
||||||
});
|
});
|
||||||
ui.btn_get.grayed = false;
|
ui.btn_get.grayed = false;
|
||||||
ui.btn_get.SetClick(() =>
|
ui.btn_get.SetClick(() =>
|
||||||
@@ -207,14 +207,14 @@ namespace BallKingdomCrush
|
|||||||
btnSign_new.line.visible = true;
|
btnSign_new.line.visible = true;
|
||||||
btnSign.SetClick(() =>
|
btnSign.SetClick(() =>
|
||||||
{
|
{
|
||||||
var startPos = GameHelper.GetUICenterPosition(btnSign);
|
// var startPos = GameHelper.GetUICenterPosition(btnSign);
|
||||||
btnSign_new.status.selectedIndex = btn_sign.Status_reward;
|
// btnSign_new.status.selectedIndex = btn_sign.Status_reward;
|
||||||
btnSign.onClick.Clear();
|
// btnSign.onClick.Clear();
|
||||||
btnSign.touchable = false;
|
// btnSign.touchable = false;
|
||||||
// sk.SetActive(false);
|
// // sk.SetActive(false);
|
||||||
btnSign_new.line.visible = false;
|
// btnSign_new.line.visible = false;
|
||||||
|
//
|
||||||
GetSignInReward(reward, startPos, btnSign_new);
|
// GetSignInReward(reward, startPos, btnSign_new);
|
||||||
});
|
});
|
||||||
ui.btn_get.grayed = false;
|
ui.btn_get.grayed = false;
|
||||||
ui.btn_get.SetClick(() =>
|
ui.btn_get.SetClick(() =>
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ namespace BallKingdomCrush
|
|||||||
loader_list.Add(ui.com_loader.GetChild("loader") as GLoader);
|
loader_list.Add(ui.com_loader.GetChild("loader") as GLoader);
|
||||||
}
|
}
|
||||||
|
|
||||||
levelUnlock_ = ConfigSystem.GetConfig<LevelUnlock>()[level_];
|
levelUnlock_ = ConfigSystem.GetLevelUnlockConfig()[level_];
|
||||||
// TextureHelper.SetImgLoader(ui.com_loader.GetChild("loader") as GLoader, levelUnlock_.Name, (s) =>
|
// TextureHelper.SetImgLoader(ui.com_loader.GetChild("loader") as GLoader, levelUnlock_.Name, (s) =>
|
||||||
// {
|
// {
|
||||||
// TextureHelper.SetImageBlur(ui.com_loader.GetChild("loader") as GLoader);
|
// TextureHelper.SetImageBlur(ui.com_loader.GetChild("loader") as GLoader);
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ namespace BallKingdomCrush
|
|||||||
private void RefreshVip(object a = null)
|
private void RefreshVip(object a = null)
|
||||||
{
|
{
|
||||||
bool have_special = GameHelper.GetVipLevel() >= 2 ? true : false;
|
bool have_special = GameHelper.GetVipLevel() >= 2 ? true : false;
|
||||||
SpecialImageLibrary special_ImageLibrary = ConfigSystem.GetConfig<SpecialImageLibrary>()[DataMgr.LevelUnlockSpecial.Value];
|
SpecialImageLibrary special_ImageLibrary = ConfigSystem.GetSpecialImageConfig()[DataMgr.LevelUnlockSpecial.Value];
|
||||||
if (special_ImageLibrary.State == 1 && !have_special) TextureHelper.SetImageBlur(ui.item_2.com_pic.picture);
|
if (special_ImageLibrary.State == 1 && !have_special) TextureHelper.SetImageBlur(ui.item_2.com_pic.picture);
|
||||||
else TextureHelper.CancelImageBlur(ui.item_2.com_pic.picture);
|
else TextureHelper.CancelImageBlur(ui.item_2.com_pic.picture);
|
||||||
if (have_special)
|
if (have_special)
|
||||||
@@ -163,7 +163,7 @@ namespace BallKingdomCrush
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool have_vip = GameHelper.GetVipLevel() >= 3 ? true : false;
|
bool have_vip = GameHelper.GetVipLevel() >= 3 ? true : false;
|
||||||
VIPImageLibrary vip_ImageLibrary = ConfigSystem.GetConfig<VIPImageLibrary>()[DataMgr.LevelUnlockVIP.Value];
|
VIPImageLibrary vip_ImageLibrary = ConfigSystem.GetVIPImageConfig()[DataMgr.LevelUnlockVIP.Value];
|
||||||
if (vip_ImageLibrary.State == 1 && !have_vip) TextureHelper.SetImageBlur(ui.item_3.com_pic.picture);
|
if (vip_ImageLibrary.State == 1 && !have_vip) TextureHelper.SetImageBlur(ui.item_3.com_pic.picture);
|
||||||
else TextureHelper.CancelImageBlur(ui.item_3.com_pic.picture);
|
else TextureHelper.CancelImageBlur(ui.item_3.com_pic.picture);
|
||||||
if (have_vip)
|
if (have_vip)
|
||||||
@@ -220,7 +220,7 @@ namespace BallKingdomCrush
|
|||||||
Debug.Log(JsonConvert.SerializeObject(ConfigSystem.GetConfig<SpecialImageLibrary>()) + "..................");
|
Debug.Log(JsonConvert.SerializeObject(ConfigSystem.GetConfig<SpecialImageLibrary>()) + "..................");
|
||||||
Debug.Log(JsonConvert.SerializeObject(ConfigSystem.GetConfig<VIPImageLibrary>()) + "..................");
|
Debug.Log(JsonConvert.SerializeObject(ConfigSystem.GetConfig<VIPImageLibrary>()) + "..................");
|
||||||
|
|
||||||
ConfigSystem.GetConfig<VIPImageLibrary>();
|
ConfigSystem.GetVIPImageConfig();
|
||||||
|
|
||||||
loader_list.Add(ui.item_0.com_pic.picture);
|
loader_list.Add(ui.item_0.com_pic.picture);
|
||||||
loader_list.Add(ui.item_1.com_pic.picture);
|
loader_list.Add(ui.item_1.com_pic.picture);
|
||||||
@@ -264,8 +264,13 @@ namespace BallKingdomCrush
|
|||||||
DataMgr.LevelUnlockVIP.Value = Vip_Alubum;
|
DataMgr.LevelUnlockVIP.Value = Vip_Alubum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var freeImageList = ConfigSystem.GetFreeImageConfig();
|
||||||
FreeImageLibrary free_ImageLibrary = ConfigSystem.GetConfig<FreeImageLibrary>()[DataMgr.LevelUnlockFree.Value];
|
int freeIndex = DataMgr.LevelUnlockFree.Value;
|
||||||
|
if (freeIndex < 0 || freeIndex >= freeImageList.Count)
|
||||||
|
{
|
||||||
|
freeIndex = freeIndex < 0 ? 0 : freeImageList.Count - 1;
|
||||||
|
}
|
||||||
|
FreeImageLibrary free_ImageLibrary = ConfigSystem.GetFreeImageConfig()[freeIndex];
|
||||||
ui.item_0.btn_unlock.pay_type.selectedIndex = 2;
|
ui.item_0.btn_unlock.pay_type.selectedIndex = 2;
|
||||||
ui.item_0_re.btn_unlock.visible = false;
|
ui.item_0_re.btn_unlock.visible = false;
|
||||||
TextureHelper.SetImgLoader(ui.item_0.com_pic.picture, free_ImageLibrary.Name, (s) =>
|
TextureHelper.SetImgLoader(ui.item_0.com_pic.picture, free_ImageLibrary.Name, (s) =>
|
||||||
@@ -275,7 +280,16 @@ namespace BallKingdomCrush
|
|||||||
|
|
||||||
int Free_Alubum_1 = PlayerPrefs.GetInt("Free_Alubum_1", -1);
|
int Free_Alubum_1 = PlayerPrefs.GetInt("Free_Alubum_1", -1);
|
||||||
Debug.Log(Free_Alubum_1);
|
Debug.Log(Free_Alubum_1);
|
||||||
FreeImageLibrary free_ImageLibrary_re = ConfigSystem.GetConfig<FreeImageLibrary>()[Free_Alubum_1];
|
var freeImageLibraryList = ConfigSystem.GetFreeImageConfig();
|
||||||
|
if (Free_Alubum_1 < 0)
|
||||||
|
{
|
||||||
|
Free_Alubum_1 = 0;
|
||||||
|
}
|
||||||
|
else if (Free_Alubum_1 >= freeImageLibraryList.Count)
|
||||||
|
{
|
||||||
|
Free_Alubum_1 = freeImageLibraryList.Count - 1;
|
||||||
|
}
|
||||||
|
FreeImageLibrary free_ImageLibrary_re = ConfigSystem.GetFreeImageConfig()[Free_Alubum_1];
|
||||||
TextureHelper.SetImgLoader(ui.item_0_re.com_pic.picture, free_ImageLibrary_re.Name, (s) =>
|
TextureHelper.SetImgLoader(ui.item_0_re.com_pic.picture, free_ImageLibrary_re.Name, (s) =>
|
||||||
{
|
{
|
||||||
if (free_ImageLibrary_re.State == 1) TextureHelper.SetImageBlur(ui.item_0_re.com_pic.picture);
|
if (free_ImageLibrary_re.State == 1) TextureHelper.SetImageBlur(ui.item_0_re.com_pic.picture);
|
||||||
@@ -312,8 +326,13 @@ namespace BallKingdomCrush
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
var adImageLibraryList = ConfigSystem.GetADImageConfig();
|
||||||
ADImageLibrary ad_ImageLibrary = ConfigSystem.GetConfig<ADImageLibrary>()[DataMgr.LevelUnlockAD.Value];
|
int adIndex = DataMgr.LevelUnlockAD.Value;
|
||||||
|
if (adIndex < 0 || adIndex >= adImageLibraryList.Count)
|
||||||
|
{
|
||||||
|
adIndex = adIndex < 0 ? 0 : adImageLibraryList.Count - 1;
|
||||||
|
}
|
||||||
|
ADImageLibrary ad_ImageLibrary = ConfigSystem.GetADImageConfig()[adIndex];
|
||||||
TextureHelper.SetImgLoader(ui.item_1.com_pic.picture, ad_ImageLibrary.Name, (s) =>
|
TextureHelper.SetImgLoader(ui.item_1.com_pic.picture, ad_ImageLibrary.Name, (s) =>
|
||||||
{
|
{
|
||||||
if (ad_ImageLibrary.State == 1) TextureHelper.SetImageBlur(ui.item_1.com_pic.picture);
|
if (ad_ImageLibrary.State == 1) TextureHelper.SetImageBlur(ui.item_1.com_pic.picture);
|
||||||
@@ -335,7 +354,14 @@ namespace BallKingdomCrush
|
|||||||
|
|
||||||
|
|
||||||
bool have_special = GameHelper.GetVipLevel() >= 2 ? true : false;
|
bool have_special = GameHelper.GetVipLevel() >= 2 ? true : false;
|
||||||
SpecialImageLibrary special_ImageLibrary = ConfigSystem.GetConfig<SpecialImageLibrary>()[DataMgr.LevelUnlockSpecial.Value];
|
var specialImageLibraryList = ConfigSystem.GetSpecialImageConfig();
|
||||||
|
int specialIndex = DataMgr.LevelUnlockSpecial.Value;
|
||||||
|
if (specialIndex < 0 || specialIndex >= specialImageLibraryList.Count)
|
||||||
|
{
|
||||||
|
specialIndex = specialIndex < 0 ? 0 : specialImageLibraryList.Count - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
SpecialImageLibrary special_ImageLibrary = specialImageLibraryList[specialIndex];
|
||||||
TextureHelper.SetImgLoader(ui.item_2.com_pic.picture, special_ImageLibrary.Name, (s) =>
|
TextureHelper.SetImgLoader(ui.item_2.com_pic.picture, special_ImageLibrary.Name, (s) =>
|
||||||
{
|
{
|
||||||
if (special_ImageLibrary.State == 1 && !have_special) TextureHelper.SetImageBlur(ui.item_2.com_pic.picture);
|
if (special_ImageLibrary.State == 1 && !have_special) TextureHelper.SetImageBlur(ui.item_2.com_pic.picture);
|
||||||
@@ -386,7 +412,14 @@ namespace BallKingdomCrush
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool have_vip = GameHelper.GetVipLevel() >= 3 ? true : false;
|
bool have_vip = GameHelper.GetVipLevel() >= 3 ? true : false;
|
||||||
VIPImageLibrary vip_ImageLibrary = ConfigSystem.GetConfig<VIPImageLibrary>()[DataMgr.LevelUnlockVIP.Value];
|
var vipImageLibraryList = ConfigSystem.GetVIPImageConfig();
|
||||||
|
int vipIndex = DataMgr.LevelUnlockVIP.Value;
|
||||||
|
if (vipIndex < 0 || vipIndex >= vipImageLibraryList.Count)
|
||||||
|
{
|
||||||
|
vipIndex = vipIndex < 0 ? 0 : vipImageLibraryList.Count - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
VIPImageLibrary vip_ImageLibrary = vipImageLibraryList[vipIndex];
|
||||||
|
|
||||||
TextureHelper.SetImgLoader(ui.item_3.com_pic.picture, vip_ImageLibrary.Name, (s) =>
|
TextureHelper.SetImgLoader(ui.item_3.com_pic.picture, vip_ImageLibrary.Name, (s) =>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -193,6 +193,8 @@ namespace BallKingdomCrush
|
|||||||
//初始化页面逻辑
|
//初始化页面逻辑
|
||||||
private void InitView()
|
private void InitView()
|
||||||
{
|
{
|
||||||
|
ui.viplevel.selectedIndex = GameHelper.GetVipLevel();
|
||||||
|
|
||||||
ui.btn_week.text_price.text = GameHelper.getPrice((decimal)vip_list[0].DiscountPrice);
|
ui.btn_week.text_price.text = GameHelper.getPrice((decimal)vip_list[0].DiscountPrice);
|
||||||
ui.btn_month.text_price.text = GameHelper.getPrice((decimal)vip_list[1].DiscountPrice);
|
ui.btn_month.text_price.text = GameHelper.getPrice((decimal)vip_list[1].DiscountPrice);
|
||||||
ui.btn_year.text_price.text = GameHelper.getPrice((decimal)vip_list[2].DiscountPrice);
|
ui.btn_year.text_price.text = GameHelper.getPrice((decimal)vip_list[2].DiscountPrice);
|
||||||
|
|||||||
@@ -387,6 +387,24 @@ public class PurchasingManager
|
|||||||
{ IAPPayManager.PRODUCT_VIP_YEAR, "2" },
|
{ IAPPayManager.PRODUCT_VIP_YEAR, "2" },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public static void SetShopMapValue()
|
||||||
|
{
|
||||||
|
var list = ConfigSystem.GetConfig<Paidcoins>();
|
||||||
|
if (list is not { Count: > 0 }) return;
|
||||||
|
foreach (var paidcoin in list)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(paidcoin.SKU))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (_shopProductMap.ContainsKey(paidcoin.SKU))
|
||||||
|
{
|
||||||
|
_shopProductMap[paidcoin.SKU] = (paidcoin.id - 1).ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static void SendEventClickByName(string name, string type)
|
public static void SendEventClickByName(string name, string type)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -150,7 +150,8 @@ namespace BallKingdomCrush
|
|||||||
var organicConfig = ConfigLoader.Instance.GetConfig<List<TOrganic>>();
|
var organicConfig = ConfigLoader.Instance.GetConfig<List<TOrganic>>();
|
||||||
if (organicConfig != null)
|
if (organicConfig != null)
|
||||||
{
|
{
|
||||||
return organicConfig.Cast<T>().ToList();
|
var json = Newtonsoft.Json.JsonConvert.SerializeObject(organicConfig);
|
||||||
|
return Newtonsoft.Json.JsonConvert.DeserializeObject<List<T>>(json);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -166,7 +167,29 @@ namespace BallKingdomCrush
|
|||||||
{
|
{
|
||||||
return GetConfigWithOrganicFallback<SecretAlbums, SecretAlbums_A>();
|
return GetConfigWithOrganicFallback<SecretAlbums, SecretAlbums_A>();
|
||||||
}
|
}
|
||||||
|
public static List<FreeImageLibrary> GetFreeImageConfig()
|
||||||
|
{
|
||||||
|
return GetConfigWithOrganicFallback<FreeImageLibrary, FreeImageLibrary_A>();
|
||||||
|
}
|
||||||
|
public static List<ADImageLibrary> GetADImageConfig()
|
||||||
|
{
|
||||||
|
return GetConfigWithOrganicFallback<ADImageLibrary, ADImageLibrary_A>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<SpecialImageLibrary> GetSpecialImageConfig()
|
||||||
|
{
|
||||||
|
return GetConfigWithOrganicFallback<SpecialImageLibrary, SpecialImageLibrary_A>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<VIPImageLibrary> GetVIPImageConfig()
|
||||||
|
{
|
||||||
|
return GetConfigWithOrganicFallback<VIPImageLibrary, VIPImageLibrary_A>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<LevelUnlock> GetLevelUnlockConfig()
|
||||||
|
{
|
||||||
|
return GetConfigWithOrganicFallback<LevelUnlock, LevelUnlock_A>();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public override void Dispose()
|
public override void Dispose()
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ namespace BallKingdomCrush {
|
|||||||
{
|
{
|
||||||
Debug.Log($"loginData.CdnURL======={loginData.CdnURL}");
|
Debug.Log($"loginData.CdnURL======={loginData.CdnURL}");
|
||||||
// AB上传 BI
|
// AB上传 BI
|
||||||
BIManager.Instance.TrackABConfig(loginData.IsMagic ? 30 : 15);
|
// BIManager.Instance.TrackABConfig(loginData.IsMagic ? 30 : 15);
|
||||||
|
|
||||||
// loginData.CdnURL = "https://asserts.minskyfun.top";
|
// loginData.CdnURL = "https://asserts.minskyfun.top";
|
||||||
|
|
||||||
|
|||||||
@@ -142,13 +142,13 @@ namespace BallKingdomCrush
|
|||||||
private static void LoadInterstitial()
|
private static void LoadInterstitial()
|
||||||
{
|
{
|
||||||
MaxSdk.LoadInterstitial(interstitialADUnitID);
|
MaxSdk.LoadInterstitial(interstitialADUnitID);
|
||||||
BIManager.Instance.TrackAdEvent(BIEvent.AD_REQUEST, "Interstitial");
|
// BIManager.Instance.TrackAdEvent(BIEvent.AD_REQUEST, "Interstitial");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void OnInterstitialLoadedEvent(string adUnitId, MaxSdkBase.AdInfo adInfo)
|
private static void OnInterstitialLoadedEvent(string adUnitId, MaxSdkBase.AdInfo adInfo)
|
||||||
{
|
{
|
||||||
retryAttemptInterstitial = 0;
|
retryAttemptInterstitial = 0;
|
||||||
BIManager.Instance.TrackAdEvent(BIEvent.AD_INVENTORY, "Interstitial", adInfo.Placement, adInfo.NetworkName);
|
// BIManager.Instance.TrackAdEvent(BIEvent.AD_INVENTORY, "Interstitial", adInfo.Placement, adInfo.NetworkName);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void OnInterstitialLoadFailedEvent(string adUnitId, MaxSdkBase.ErrorInfo errorInfo)
|
private static void OnInterstitialLoadFailedEvent(string adUnitId, MaxSdkBase.ErrorInfo errorInfo)
|
||||||
@@ -161,8 +161,8 @@ namespace BallKingdomCrush
|
|||||||
|
|
||||||
private static void OnInterstitialDisplayedEvent(string adUnitId, MaxSdkBase.AdInfo adInfo)
|
private static void OnInterstitialDisplayedEvent(string adUnitId, MaxSdkBase.AdInfo adInfo)
|
||||||
{
|
{
|
||||||
BIManager.Instance.TrackAdEvent(BIEvent.AD_IMP, "Interstitial", adInfo.Placement, adInfo.NetworkName,
|
// BIManager.Instance.TrackAdEvent(BIEvent.AD_IMP, "Interstitial", adInfo.Placement, adInfo.NetworkName,
|
||||||
adInfo.Revenue, _placement);
|
// adInfo.Revenue, _placement);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void OnInterstitialAdFailedToDisplayEvent(string adUnitId, MaxSdkBase.ErrorInfo errorInfo,
|
private static void OnInterstitialAdFailedToDisplayEvent(string adUnitId, MaxSdkBase.ErrorInfo errorInfo,
|
||||||
@@ -173,7 +173,7 @@ namespace BallKingdomCrush
|
|||||||
|
|
||||||
private static void OnInterstitialClickedEvent(string adUnitId, MaxSdkBase.AdInfo adInfo)
|
private static void OnInterstitialClickedEvent(string adUnitId, MaxSdkBase.AdInfo adInfo)
|
||||||
{
|
{
|
||||||
BIManager.Instance.TrackAdEvent(BIEvent.AD_CLICK, "Interstitial", adInfo.Placement, adInfo.NetworkName);
|
// BIManager.Instance.TrackAdEvent(BIEvent.AD_CLICK, "Interstitial", adInfo.Placement, adInfo.NetworkName);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void OnInterstitialHiddenEvent(string adUnitId, MaxSdkBase.AdInfo adInfo)
|
private static void OnInterstitialHiddenEvent(string adUnitId, MaxSdkBase.AdInfo adInfo)
|
||||||
@@ -213,6 +213,12 @@ namespace BallKingdomCrush
|
|||||||
}, ()=>
|
}, ()=>
|
||||||
{
|
{
|
||||||
Debug.Log($"激励广告关闭");
|
Debug.Log($"激励广告关闭");
|
||||||
|
if (GameHelper.IsGiftSwitch() && !SaveData.GetSaveObject().is_get_removead && (UnityEngine.Random.Range(0, 100) < GameHelper.GetCommonModel().rewardinsertion))
|
||||||
|
{
|
||||||
|
TrackKit.SendEvent(ADEventTrack.AD_Event, ADEventTrack.Property.afterRewardAdShow);
|
||||||
|
|
||||||
|
GameHelper.ShowInterstitial("AfterReward");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -284,7 +290,7 @@ namespace BallKingdomCrush
|
|||||||
private static void LoadRewardedAd()
|
private static void LoadRewardedAd()
|
||||||
{
|
{
|
||||||
MaxSdk.LoadRewardedAd(rewardedADUnitID);
|
MaxSdk.LoadRewardedAd(rewardedADUnitID);
|
||||||
BIManager.Instance.TrackAdEvent(BIEvent.AD_REQUEST, "RewardedVideo");
|
// BIManager.Instance.TrackAdEvent(BIEvent.AD_REQUEST, "RewardedVideo");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void OnInterstitialAdRevenueEvent(string adUnitId, MaxSdkBase.AdInfo adInfo)
|
private static void OnInterstitialAdRevenueEvent(string adUnitId, MaxSdkBase.AdInfo adInfo)
|
||||||
@@ -391,8 +397,8 @@ namespace BallKingdomCrush
|
|||||||
retryAttempt = 0;
|
retryAttempt = 0;
|
||||||
TrackKit.SendEvent(ADEventTrack.AD_Event, $"{ADEventTrack.Property.ad_load_code}Succeed");
|
TrackKit.SendEvent(ADEventTrack.AD_Event, $"{ADEventTrack.Property.ad_load_code}Succeed");
|
||||||
|
|
||||||
BIManager.Instance.TrackAdEvent(BIEvent.AD_INVENTORY, "RewardedVideo", adInfo.Placement,
|
// BIManager.Instance.TrackAdEvent(BIEvent.AD_INVENTORY, "RewardedVideo", adInfo.Placement,
|
||||||
adInfo.NetworkName);
|
// adInfo.NetworkName);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void OnRewardedAdLoadFailedEvent(string adUnitId, MaxSdkBase.ErrorInfo errorInfo)
|
private static void OnRewardedAdLoadFailedEvent(string adUnitId, MaxSdkBase.ErrorInfo errorInfo)
|
||||||
@@ -407,8 +413,8 @@ namespace BallKingdomCrush
|
|||||||
private static void OnRewardedAdDisplayedEvent(string adUnitId, MaxSdkBase.AdInfo adInfo)
|
private static void OnRewardedAdDisplayedEvent(string adUnitId, MaxSdkBase.AdInfo adInfo)
|
||||||
{
|
{
|
||||||
TrackKit.SendEvent(ADEventTrack.AD_Event, $"{ADEventTrack.Property.ad_show_code}Succeed");
|
TrackKit.SendEvent(ADEventTrack.AD_Event, $"{ADEventTrack.Property.ad_show_code}Succeed");
|
||||||
BIManager.Instance.TrackAdEvent(BIEvent.AD_IMP, "RewardedVideo", adInfo.Placement, adInfo.NetworkName,
|
// BIManager.Instance.TrackAdEvent(BIEvent.AD_IMP, "RewardedVideo", adInfo.Placement, adInfo.NetworkName,
|
||||||
adInfo.Revenue, _placement);
|
// adInfo.Revenue, _placement);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void OnRewardedAdFailedToDisplayEvent(string adUnitId, MaxSdkBase.ErrorInfo errorInfo,
|
private static void OnRewardedAdFailedToDisplayEvent(string adUnitId, MaxSdkBase.ErrorInfo errorInfo,
|
||||||
@@ -421,7 +427,7 @@ namespace BallKingdomCrush
|
|||||||
|
|
||||||
private static void OnRewardedAdClickedEvent(string adUnitId, MaxSdkBase.AdInfo adInfo)
|
private static void OnRewardedAdClickedEvent(string adUnitId, MaxSdkBase.AdInfo adInfo)
|
||||||
{
|
{
|
||||||
BIManager.Instance.TrackAdEvent(BIEvent.AD_CLICK, "RewardedVideo", adInfo.Placement, adInfo.NetworkName);
|
// BIManager.Instance.TrackAdEvent(BIEvent.AD_CLICK, "RewardedVideo", adInfo.Placement, adInfo.NetworkName);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void OnRewardedAdHiddenEvent(string adUnitId, MaxSdkBase.AdInfo adInfo)
|
private static void OnRewardedAdHiddenEvent(string adUnitId, MaxSdkBase.AdInfo adInfo)
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 8f1fa5ea7faab4e19b53e1840a93cd11
|
guid: 54ee81bee93f0ec4892bf47c7e311b27
|
||||||
TextScriptImporter:
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||