diff --git a/Assets/Resources/Config/GameConfig.asset b/Assets/Resources/Config/GameConfig.asset index aeb19f3e..0d36a3a8 100644 --- a/Assets/Resources/Config/GameConfig.asset +++ b/Assets/Resources/Config/GameConfig.asset @@ -14,6 +14,7 @@ MonoBehaviour: m_EditorClassIdentifier: IsDebug: 0 IsAutoLevel: 0 + UseFakeMode: 0 UseDiamond: 0 JumpText: 0 IsSimpleAni: 1 diff --git a/Assets/Scripts/Config/GameConfig.cs b/Assets/Scripts/Config/GameConfig.cs index af1e0b3c..7dc7eea5 100644 --- a/Assets/Scripts/Config/GameConfig.cs +++ b/Assets/Scripts/Config/GameConfig.cs @@ -6,10 +6,11 @@ using UnityEngine; [CreateAssetMenu(menuName = "GameConfig")] public class GameConfig : ConfigBase { - public bool IsFakeMode => !IsDebug && TKGSDKManager.Instance.GetConfigBool(TKGParamKey.IsFakeMode); + public bool IsFakeMode => UseFakeMode && !PlayerData.Instance.IsIPShow; public bool IsDebug; public bool IsAutoLevel; + public bool UseFakeMode = false; public bool UseDiamond; public bool JumpText = true; public bool IsSimpleAni = true; diff --git a/Assets/Scripts/Debug/SROptions.MergeTactics.cs b/Assets/Scripts/Debug/SROptions.MergeTactics.cs index 22aaf704..de4f4dd8 100644 --- a/Assets/Scripts/Debug/SROptions.MergeTactics.cs +++ b/Assets/Scripts/Debug/SROptions.MergeTactics.cs @@ -66,6 +66,13 @@ public partial class SROptions set => PlayerData.Instance.IsMMOUser = value; } + [Category("功能")] + public bool 是否展示IP内容 + { + get => PlayerData.Instance.IsIPShow; + set => PlayerData.Instance.IsIPShow = value; + } + [Category("功能")] public bool 战力开关 { diff --git a/Assets/Scripts/Storage/PlayerData.cs b/Assets/Scripts/Storage/PlayerData.cs index e603e2a3..59fcb9a3 100644 --- a/Assets/Scripts/Storage/PlayerData.cs +++ b/Assets/Scripts/Storage/PlayerData.cs @@ -16,6 +16,17 @@ public class PlayerData : StorageBase } [SerializeField] bool mIsMMOUser = false; + public bool IsIPShow + { + get => mIsIPShow; + set + { + mIsIPShow = value; + Save(); + } + } + [SerializeField] bool mIsIPShow = false; + public int CurrentLevel { get => mCurrentLevel; @@ -203,18 +214,26 @@ public class PlayerData : StorageBase if (!GameConfig.Instance.IsDebug) { - List tFuncs = new List() { Touka.FunctionType.Function_wangz }; + List tFuncs = new List() { Touka.FunctionType.Function_wangz, Touka.FunctionType.Function_IP }; TKGSDKManager.Instance.SetFunctionSwitchListener(tFuncs, OnUserSource); } } private void OnUserSource(Touka.FunctionType pFuncType, bool pOn) { - mIsMMOUser = pOn; - Save(); + switch (pFuncType) + { + case Touka.FunctionType.Function_wangz: + IsMMOUser = pOn; + Debug.Log("Usersource is mmo :" + IsMMOUser); + break; + case Touka.FunctionType.Function_IP: + IsIPShow = pOn; + Debug.Log("Usersource is IP show :" + IsIPShow); + break; + } Debug.Log("【ToukaGame】回调:func:" + pFuncType + "result:" + pOn); - Debug.Log("Usersource is mmo :" + mIsMMOUser); } #region card diff --git a/Assets/TKGSDK/Config/Scripts/TKGParams.cs b/Assets/TKGSDK/Config/Scripts/TKGParams.cs index 48cfd5f9..79184ea3 100644 --- a/Assets/TKGSDK/Config/Scripts/TKGParams.cs +++ b/Assets/TKGSDK/Config/Scripts/TKGParams.cs @@ -15,7 +15,6 @@ public static class TKGParams #else { TKGParamKey.NativeSwitch.ToString(), 0 }, #endif - { TKGParamKey.IsFakeMode.ToString(), 0 }, #region MMO,无特殊要求后台加第一个就行 { TKGParamKey.Invitable.ToString(), GameConfig.Instance.IsDebug ? 1 : 0 }, @@ -47,8 +46,6 @@ public enum TKGParamKey LevelInterSwitch, NativeSwitch, - IsFakeMode, - #region MMO,无特殊要求后台加第一个就行 Invitable, ShareContent,