SDK参数控制IP内容
This commit is contained in:
parent
cf433f864c
commit
6e5d4407f7
|
@ -14,6 +14,7 @@ MonoBehaviour:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
IsDebug: 0
|
IsDebug: 0
|
||||||
IsAutoLevel: 0
|
IsAutoLevel: 0
|
||||||
|
UseFakeMode: 0
|
||||||
UseDiamond: 0
|
UseDiamond: 0
|
||||||
JumpText: 0
|
JumpText: 0
|
||||||
IsSimpleAni: 1
|
IsSimpleAni: 1
|
||||||
|
|
|
@ -6,10 +6,11 @@ using UnityEngine;
|
||||||
[CreateAssetMenu(menuName = "GameConfig")]
|
[CreateAssetMenu(menuName = "GameConfig")]
|
||||||
public class GameConfig : ConfigBase<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 IsDebug;
|
||||||
public bool IsAutoLevel;
|
public bool IsAutoLevel;
|
||||||
|
public bool UseFakeMode = false;
|
||||||
public bool UseDiamond;
|
public bool UseDiamond;
|
||||||
public bool JumpText = true;
|
public bool JumpText = true;
|
||||||
public bool IsSimpleAni = true;
|
public bool IsSimpleAni = true;
|
||||||
|
|
|
@ -66,6 +66,13 @@ public partial class SROptions
|
||||||
set => PlayerData.Instance.IsMMOUser = value;
|
set => PlayerData.Instance.IsMMOUser = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Category("功能")]
|
||||||
|
public bool 是否展示IP内容
|
||||||
|
{
|
||||||
|
get => PlayerData.Instance.IsIPShow;
|
||||||
|
set => PlayerData.Instance.IsIPShow = value;
|
||||||
|
}
|
||||||
|
|
||||||
[Category("功能")]
|
[Category("功能")]
|
||||||
public bool 战力开关
|
public bool 战力开关
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,6 +16,17 @@ public class PlayerData : StorageBase<PlayerData>
|
||||||
}
|
}
|
||||||
[SerializeField] bool mIsMMOUser = false;
|
[SerializeField] bool mIsMMOUser = false;
|
||||||
|
|
||||||
|
public bool IsIPShow
|
||||||
|
{
|
||||||
|
get => mIsIPShow;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
mIsIPShow = value;
|
||||||
|
Save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[SerializeField] bool mIsIPShow = false;
|
||||||
|
|
||||||
public int CurrentLevel
|
public int CurrentLevel
|
||||||
{
|
{
|
||||||
get => mCurrentLevel;
|
get => mCurrentLevel;
|
||||||
|
@ -203,18 +214,26 @@ public class PlayerData : StorageBase<PlayerData>
|
||||||
|
|
||||||
if (!GameConfig.Instance.IsDebug)
|
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);
|
TKGSDKManager.Instance.SetFunctionSwitchListener(tFuncs, OnUserSource);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnUserSource(Touka.FunctionType pFuncType, bool pOn)
|
private void OnUserSource(Touka.FunctionType pFuncType, bool pOn)
|
||||||
{
|
{
|
||||||
mIsMMOUser = pOn;
|
switch (pFuncType)
|
||||||
Save();
|
{
|
||||||
|
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("【ToukaGame】回调:func:" + pFuncType + "result:" + pOn);
|
||||||
Debug.Log("Usersource is mmo :" + mIsMMOUser);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region card
|
#region card
|
||||||
|
|
|
@ -15,7 +15,6 @@ public static class TKGParams
|
||||||
#else
|
#else
|
||||||
{ TKGParamKey.NativeSwitch.ToString(), 0 },
|
{ TKGParamKey.NativeSwitch.ToString(), 0 },
|
||||||
#endif
|
#endif
|
||||||
{ TKGParamKey.IsFakeMode.ToString(), 0 },
|
|
||||||
|
|
||||||
#region MMO,无特殊要求后台加第一个就行
|
#region MMO,无特殊要求后台加第一个就行
|
||||||
{ TKGParamKey.Invitable.ToString(), GameConfig.Instance.IsDebug ? 1 : 0 },
|
{ TKGParamKey.Invitable.ToString(), GameConfig.Instance.IsDebug ? 1 : 0 },
|
||||||
|
@ -47,8 +46,6 @@ public enum TKGParamKey
|
||||||
LevelInterSwitch,
|
LevelInterSwitch,
|
||||||
NativeSwitch,
|
NativeSwitch,
|
||||||
|
|
||||||
IsFakeMode,
|
|
||||||
|
|
||||||
#region MMO,无特殊要求后台加第一个就行
|
#region MMO,无特殊要求后台加第一个就行
|
||||||
Invitable,
|
Invitable,
|
||||||
ShareContent,
|
ShareContent,
|
||||||
|
|
Loading…
Reference in New Issue