SDK参数控制IP内容
This commit is contained in:
parent
cf433f864c
commit
6e5d4407f7
|
@ -14,6 +14,7 @@ MonoBehaviour:
|
|||
m_EditorClassIdentifier:
|
||||
IsDebug: 0
|
||||
IsAutoLevel: 0
|
||||
UseFakeMode: 0
|
||||
UseDiamond: 0
|
||||
JumpText: 0
|
||||
IsSimpleAni: 1
|
||||
|
|
|
@ -6,10 +6,11 @@ using UnityEngine;
|
|||
[CreateAssetMenu(menuName = "GameConfig")]
|
||||
public class GameConfig : ConfigBase<GameConfig>
|
||||
{
|
||||
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;
|
||||
|
|
|
@ -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 战力开关
|
||||
{
|
||||
|
|
|
@ -16,6 +16,17 @@ public class PlayerData : StorageBase<PlayerData>
|
|||
}
|
||||
[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<PlayerData>
|
|||
|
||||
if (!GameConfig.Instance.IsDebug)
|
||||
{
|
||||
List<Touka.FunctionType> tFuncs = new List<Touka.FunctionType>() { Touka.FunctionType.Function_wangz };
|
||||
List<Touka.FunctionType> tFuncs = new List<Touka.FunctionType>() { 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
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue