fix:1、修复bug
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,14 @@
|
|||||||
|
<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.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
-1
@@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 796bb1165da86824ca3f53d1b1005e20
|
guid: 79c31e8565590ac419eabb9381c360af
|
||||||
TextScriptImporter:
|
TextScriptImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: cfbaddc877b6fb14396b53751ad7c1c1
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -30,6 +30,7 @@ namespace IgnoreOPS
|
|||||||
public int rewardinsertion;
|
public int rewardinsertion;
|
||||||
public int exchangeCD = 120;
|
public int exchangeCD = 120;
|
||||||
public int PayRate;
|
public int PayRate;
|
||||||
|
public int non;
|
||||||
|
|
||||||
public int AddDiscountLevel;
|
public int AddDiscountLevel;
|
||||||
public int AddDiscountCD;
|
public int AddDiscountCD;
|
||||||
|
|||||||
@@ -517,7 +517,7 @@ namespace BallKingdomCrush
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
countryCode = RegionInfo.CurrentRegion.TwoLetterISORegionName;
|
countryCode = RegionInfo.CurrentRegion.TwoLetterISORegionName;
|
||||||
Debug.Log("国家代码: " + countryCode); // 例如:US, CN, JP, DE 等
|
// Debug.Log("国家代码: " + countryCode); // 例如:US, CN, JP, DE 等
|
||||||
}
|
}
|
||||||
catch (System.Exception e)
|
catch (System.Exception e)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -144,6 +144,7 @@ namespace BallKingdomCrush
|
|||||||
private void openWB(object obj) {
|
private void openWB(object obj) {
|
||||||
SdkConfigMgr.Instance.Open();
|
SdkConfigMgr.Instance.Open();
|
||||||
CreatAnimalCard.instance.SetCameraVisible(false);
|
CreatAnimalCard.instance.SetCameraVisible(false);
|
||||||
|
CameraManager.Instance.SetMainCameraBackgroundTransparent();
|
||||||
if (UIManager.Instance.IsExistUI(UIConst.RainPlayUI)) {
|
if (UIManager.Instance.IsExistUI(UIConst.RainPlayUI)) {
|
||||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.H5UI_Open, false);
|
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.H5UI_Open, false);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+42416
-42413
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -1 +1 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?><resources><string name="com.crashlytics.android.build_id" translatable="false">120df273-b302-4553-adff-4fad18c4d418</string></resources>
|
<?xml version="1.0" encoding="utf-8"?><resources><string name="com.crashlytics.android.build_id" translatable="false">7ee01aac-7ff8-45e0-af00-e878e21c22e1</string></resources>
|
||||||
|
|||||||
@@ -704,7 +704,7 @@ Transform:
|
|||||||
m_GameObject: {fileID: 275783129}
|
m_GameObject: {fileID: 275783129}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: -0.2556, y: -34.4, z: 401}
|
m_LocalPosition: {x: -0.2556, y: -34.4, z: 399}
|
||||||
m_LocalScale: {x: 5.2, y: 5.2, z: 1}
|
m_LocalScale: {x: 5.2, y: 5.2, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace BallKingdomCrush
|
|||||||
#region Field
|
#region Field
|
||||||
|
|
||||||
#if GAME_RELEASE
|
#if GAME_RELEASE
|
||||||
public static bool IsEnabledEngineLog = true;
|
public static bool IsEnabledEngineLog = false;
|
||||||
#else
|
#else
|
||||||
public static bool IsEnabledEngineLog = true;
|
public static bool IsEnabledEngineLog = true;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,148 +1,157 @@
|
|||||||
using FairyGUI;
|
using FairyGUI;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.EventSystems;
|
using UnityEngine.EventSystems;
|
||||||
|
|
||||||
namespace BallKingdomCrush
|
namespace BallKingdomCrush
|
||||||
{
|
{
|
||||||
public sealed class CameraManager : BaseInterfaceManager<CameraManager>
|
public sealed class CameraManager : BaseInterfaceManager<CameraManager>
|
||||||
{
|
{
|
||||||
public Transform mainCameraRoot;
|
public Transform mainCameraRoot;
|
||||||
public GameObject mainCameraGo;
|
public GameObject mainCameraGo;
|
||||||
public Camera mainCamera;
|
public Camera mainCamera;
|
||||||
|
|
||||||
public Transform fguiCameraRoot;
|
public Transform fguiCameraRoot;
|
||||||
public GameObject fguiCameraGo;
|
public GameObject fguiCameraGo;
|
||||||
public Camera fguiCamera;
|
public Camera fguiCamera;
|
||||||
|
|
||||||
|
|
||||||
public bool isEnabledWorldRaycast;
|
public bool isEnabledWorldRaycast;
|
||||||
public Physics2DRaycaster physics2DRaycaster;
|
public Physics2DRaycaster physics2DRaycaster;
|
||||||
public PhysicsRaycaster physics3DRaycaster;
|
public PhysicsRaycaster physics3DRaycaster;
|
||||||
|
|
||||||
private bool isMainCameraShakeing;
|
private bool isMainCameraShakeing;
|
||||||
|
|
||||||
#region Coordinate
|
#region Coordinate
|
||||||
|
|
||||||
public Vector2 WorldPosToFGUIPos(Vector3 worldPos)
|
public Vector2 WorldPosToFGUIPos(Vector3 worldPos)
|
||||||
{
|
{
|
||||||
Vector3 screenPos = mainCamera.WorldToScreenPoint(worldPos);
|
Vector3 screenPos = mainCamera.WorldToScreenPoint(worldPos);
|
||||||
|
|
||||||
screenPos.y = ScreenConst.CurrResolution.y - screenPos.y;
|
screenPos.y = ScreenConst.CurrResolution.y - screenPos.y;
|
||||||
Vector2 pt = GRoot.inst.GlobalToLocal(screenPos);
|
Vector2 pt = GRoot.inst.GlobalToLocal(screenPos);
|
||||||
return pt;
|
return pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Func
|
#region Func
|
||||||
|
|
||||||
public void SetWorldRaycasterEnabled(bool enabled)
|
public void SetWorldRaycasterEnabled(bool enabled)
|
||||||
{
|
{
|
||||||
isEnabledWorldRaycast = enabled;
|
isEnabledWorldRaycast = enabled;
|
||||||
if (physics2DRaycaster != null)
|
if (physics2DRaycaster != null)
|
||||||
{
|
{
|
||||||
EventKit.Set2DRaycasterEnabled(physics2DRaycaster, isEnabledWorldRaycast);
|
EventKit.Set2DRaycasterEnabled(physics2DRaycaster, isEnabledWorldRaycast);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (physics3DRaycaster != null)
|
if (physics3DRaycaster != null)
|
||||||
{
|
{
|
||||||
EventKit.Set3DRaycasterEnabled(physics3DRaycaster, isEnabledWorldRaycast);
|
EventKit.Set3DRaycasterEnabled(physics3DRaycaster, isEnabledWorldRaycast);
|
||||||
}
|
}
|
||||||
|
|
||||||
AppDispatcher.Instance.Dispatch(AppMsg.WorldRaycast_EnableChange, isEnabledWorldRaycast);
|
AppDispatcher.Instance.Dispatch(AppMsg.WorldRaycast_EnableChange, isEnabledWorldRaycast);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Camera
|
#region Camera
|
||||||
|
|
||||||
public void CreateMainCamera()
|
public void CreateMainCamera()
|
||||||
{
|
{
|
||||||
if (mainCamera) return;
|
if (mainCamera) return;
|
||||||
|
|
||||||
string name = "MainCamera";
|
string name = "MainCamera";
|
||||||
mainCameraGo = new GameObject(name);
|
mainCameraGo = new GameObject(name);
|
||||||
mainCameraGo.tag = name;
|
mainCameraGo.tag = name;
|
||||||
mainCameraGo.layer = LayerMaskConst.Default;
|
mainCameraGo.layer = LayerMaskConst.Default;
|
||||||
mainCameraGo.transform.localPosition = Vector3.zero;
|
mainCameraGo.transform.localPosition = Vector3.zero;
|
||||||
int cullingMask = LayerMask.GetMask(LayerMaskConst.Default_Name);
|
int cullingMask = LayerMask.GetMask(LayerMaskConst.Default_Name);
|
||||||
mainCamera = CreateCamera(mainCameraGo, cullingMask: cullingMask);
|
mainCamera = CreateCamera(mainCameraGo, cullingMask: cullingMask);
|
||||||
mainCamera.clearFlags = CameraClearFlags.SolidColor;
|
mainCamera.clearFlags = CameraClearFlags.SolidColor;
|
||||||
|
|
||||||
mainCamera.forceIntoRenderTexture = false;
|
mainCamera.forceIntoRenderTexture = false;
|
||||||
|
|
||||||
GameObject root = new GameObject(name + "Root");
|
GameObject root = new GameObject(name + "Root");
|
||||||
root.transform.position = CameraConst.MainCameraPos;
|
root.transform.position = CameraConst.MainCameraPos;
|
||||||
root.SetParent(AppObjConst.CameraGo);
|
root.SetParent(AppObjConst.CameraGo);
|
||||||
mainCameraGo.SetParent(root);
|
mainCameraGo.SetParent(root);
|
||||||
mainCameraRoot = root.transform;
|
mainCameraRoot = root.transform;
|
||||||
|
|
||||||
CameraAdaptive adaptiveCom = mainCamera.gameObject.AddComponent<CameraAdaptive>();
|
CameraAdaptive adaptiveCom = mainCamera.gameObject.AddComponent<CameraAdaptive>();
|
||||||
adaptiveCom.DoAdaptive(isOrthographic: true, orthographicSize: ScreenConst.OrthographicSize_1280H);
|
adaptiveCom.DoAdaptive(isOrthographic: true, orthographicSize: ScreenConst.OrthographicSize_1280H);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CreateFGUICamera()
|
public void CreateFGUICamera()
|
||||||
{
|
{
|
||||||
if (fguiCamera) return;
|
if (fguiCamera) return;
|
||||||
|
|
||||||
StageCamera.CheckMainCamera();
|
StageCamera.CheckMainCamera();
|
||||||
fguiCamera = StageCamera.main;
|
fguiCamera = StageCamera.main;
|
||||||
fguiCamera.depth = CameraConst.UICameraDepth;
|
fguiCamera.depth = CameraConst.UICameraDepth;
|
||||||
|
|
||||||
fguiCamera.forceIntoRenderTexture = false;
|
fguiCamera.forceIntoRenderTexture = false;
|
||||||
fguiCameraGo = fguiCamera.gameObject;
|
fguiCameraGo = fguiCamera.gameObject;
|
||||||
|
|
||||||
GameObject root = new GameObject("FGUICameraRoot");
|
GameObject root = new GameObject("FGUICameraRoot");
|
||||||
root.transform.position = CameraConst.UICameraPos;
|
root.transform.position = CameraConst.UICameraPos;
|
||||||
root.SetParent(AppObjConst.CameraGo);
|
root.SetParent(AppObjConst.CameraGo);
|
||||||
fguiCameraGo.SetParent(root);
|
fguiCameraGo.SetParent(root);
|
||||||
fguiCameraRoot = root.transform;
|
fguiCameraRoot = root.transform;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Camera CreateCamera(GameObject cameraGo, int cullingMask)
|
public Camera CreateCamera(GameObject cameraGo, int cullingMask)
|
||||||
{
|
{
|
||||||
Camera cameraCom = cameraGo.AddComponent<Camera>();
|
Camera cameraCom = cameraGo.AddComponent<Camera>();
|
||||||
cameraCom.clearFlags = CameraClearFlags.Depth;
|
cameraCom.clearFlags = CameraClearFlags.Depth;
|
||||||
cameraCom.backgroundColor = Color.black;
|
cameraCom.backgroundColor = Color.black;
|
||||||
cameraCom.cullingMask = cullingMask;
|
cameraCom.cullingMask = cullingMask;
|
||||||
cameraCom.nearClipPlane = -30f;
|
cameraCom.nearClipPlane = -30f;
|
||||||
cameraCom.farClipPlane = 30f;
|
cameraCom.farClipPlane = 30f;
|
||||||
cameraCom.rect = new Rect(0, 0, 1f, 1f);
|
cameraCom.rect = new Rect(0, 0, 1f, 1f);
|
||||||
cameraCom.depth = CameraConst.MainDepth;
|
cameraCom.depth = CameraConst.MainDepth;
|
||||||
cameraCom.renderingPath = RenderingPath.UsePlayerSettings;
|
cameraCom.renderingPath = RenderingPath.UsePlayerSettings;
|
||||||
cameraCom.useOcclusionCulling = false;
|
cameraCom.useOcclusionCulling = false;
|
||||||
cameraCom.allowHDR = false;
|
cameraCom.allowHDR = false;
|
||||||
cameraCom.allowMSAA = false;
|
cameraCom.allowMSAA = false;
|
||||||
cameraCom.orthographicSize = 9.6f;
|
cameraCom.orthographicSize = 9.6f;
|
||||||
cameraCom.forceIntoRenderTexture = false;
|
cameraCom.forceIntoRenderTexture = false;
|
||||||
return cameraCom;
|
return cameraCom;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Mgr
|
#region Mgr
|
||||||
|
|
||||||
public override void Init()
|
public override void Init()
|
||||||
{
|
{
|
||||||
base.Init();
|
base.Init();
|
||||||
InitCameraMgr();
|
InitCameraMgr();
|
||||||
|
|
||||||
CreateMainCamera();
|
CreateMainCamera();
|
||||||
CreateFGUICamera();
|
CreateFGUICamera();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitCameraMgr()
|
private void InitCameraMgr()
|
||||||
{
|
{
|
||||||
AppObjConst.CameraGo = new GameObject(AppObjConst.CameraGoName);
|
AppObjConst.CameraGo = new GameObject(AppObjConst.CameraGoName);
|
||||||
AppObjConst.CameraGo.SetParent(AppObjConst.FrameGo);
|
AppObjConst.CameraGo.SetParent(AppObjConst.FrameGo);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Dispose()
|
public override void Dispose()
|
||||||
{
|
{
|
||||||
base.Dispose();
|
base.Dispose();
|
||||||
GeneralKit.Destroy(AppObjConst.CameraGo);
|
GeneralKit.Destroy(AppObjConst.CameraGo);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
public void SetMainCameraBackgroundTransparent()
|
||||||
}
|
{
|
||||||
|
// if (mainCamera != null)
|
||||||
|
// {
|
||||||
|
// mainCamera.clearFlags = CameraClearFlags.SolidColor;
|
||||||
|
// mainCamera.backgroundColor = new Color(0, 0, 0, 0);
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+190
-190
@@ -1,191 +1,191 @@
|
|||||||
namespace BallKingdomCrush
|
namespace BallKingdomCrush
|
||||||
{
|
{
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
|
||||||
public class SuperApplication : SApplication
|
public class SuperApplication : SApplication
|
||||||
{
|
{
|
||||||
private static SuperApplication m_instance;
|
private static SuperApplication m_instance;
|
||||||
|
|
||||||
public string attribution = "organic";
|
public string attribution = "organic";
|
||||||
|
|
||||||
public static SuperApplication Instance
|
public static SuperApplication Instance
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (m_instance == null)
|
if (m_instance == null)
|
||||||
{
|
{
|
||||||
if (IsAppQuit)
|
if (IsAppQuit)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
AppObjConst.ApplicationGo = new GameObject(AppObjConst.ApplicationGoName);
|
AppObjConst.ApplicationGo = new GameObject(AppObjConst.ApplicationGoName);
|
||||||
AppObjConst.ApplicationGo.SetParent(AppObjConst.FrameGo);
|
AppObjConst.ApplicationGo.SetParent(AppObjConst.FrameGo);
|
||||||
m_instance = AppObjConst.ApplicationGo.AddComponent<SuperApplication>();
|
m_instance = AppObjConst.ApplicationGo.AddComponent<SuperApplication>();
|
||||||
}
|
}
|
||||||
|
|
||||||
return m_instance;
|
return m_instance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Init()
|
public override void Init()
|
||||||
{
|
{
|
||||||
base.Init();
|
base.Init();
|
||||||
if (!PlayerPrefsKit.HasKey(PrefsKeyConst.App_isNewInstall))
|
if (!PlayerPrefsKit.HasKey(PrefsKeyConst.App_isNewInstall))
|
||||||
{
|
{
|
||||||
PlayerPrefsKit.WriteInt(PrefsKeyConst.App_isNewInstall, 1);
|
PlayerPrefsKit.WriteInt(PrefsKeyConst.App_isNewInstall, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
AppDispatcher.Instance.AddListener(AppMsg.AppManagerRegister,
|
AppDispatcher.Instance.AddListener(AppMsg.AppManagerRegister,
|
||||||
(obj) => { AppManagerRegister.RegisterData(); });
|
(obj) => { AppManagerRegister.RegisterData(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Enable()
|
public override void Enable()
|
||||||
{
|
{
|
||||||
base.Enable();
|
base.Enable();
|
||||||
|
|
||||||
InitPlugin();
|
InitPlugin();
|
||||||
InitAppSetting();
|
InitAppSetting();
|
||||||
|
|
||||||
ManagerRegister.Register();
|
ManagerRegister.Register();
|
||||||
AppManagerRegister.Register();
|
AppManagerRegister.Register();
|
||||||
ManagerRegister.RegisterData();
|
ManagerRegister.RegisterData();
|
||||||
|
|
||||||
ManagerOfManager.Instance.Init();
|
ManagerOfManager.Instance.Init();
|
||||||
ModuleManager.Instance.StartUpAllModule();
|
ModuleManager.Instance.StartUpAllModule();
|
||||||
|
|
||||||
InitSettingMode();
|
InitSettingMode();
|
||||||
StartUpGameMain();
|
StartUpGameMain();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnDestroy()
|
private void OnDestroy()
|
||||||
{
|
{
|
||||||
m_instance = null;
|
m_instance = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Enable
|
#region Enable
|
||||||
|
|
||||||
private void InitPlugin()
|
private void InitPlugin()
|
||||||
{
|
{
|
||||||
DOTweenHelper.Init();
|
DOTweenHelper.Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitAppSetting()
|
private void InitAppSetting()
|
||||||
{
|
{
|
||||||
if (!AppConst.UseInternalSetting) return;
|
if (!AppConst.UseInternalSetting) return;
|
||||||
|
|
||||||
Physics.autoSimulation = true;
|
Physics.autoSimulation = true;
|
||||||
Physics.autoSyncTransforms = true;
|
Physics.autoSyncTransforms = true;
|
||||||
Physics2D.simulationMode = SimulationMode2D.Script;
|
Physics2D.simulationMode = SimulationMode2D.Script;
|
||||||
Physics2D.autoSyncTransforms = true;
|
Physics2D.autoSyncTransforms = true;
|
||||||
Debug.unityLogger.logEnabled = AppConst.IsEnabledEngineLog;
|
Debug.unityLogger.logEnabled = AppConst.IsEnabledEngineLog;
|
||||||
Debug.unityLogger.filterLogType = AppConst.EnabledFilterLogType;
|
Debug.unityLogger.filterLogType = AppConst.EnabledFilterLogType;
|
||||||
Screen.sleepTimeout = AppConst.SleepTimeoutMode;
|
Screen.sleepTimeout = AppConst.SleepTimeoutMode;
|
||||||
Application.runInBackground = AppConst.IsRunInBG;
|
Application.runInBackground = AppConst.IsRunInBG;
|
||||||
QualitySettings.vSyncCount = 0;
|
QualitySettings.vSyncCount = 0;
|
||||||
QualitySettings.lodBias = 1;
|
QualitySettings.lodBias = 1;
|
||||||
QualitySettings.antiAliasing = AppConst.AntiAliasing;
|
QualitySettings.antiAliasing = AppConst.AntiAliasing;
|
||||||
Application.targetFrameRate = AppConst.LowFrameRate;
|
Application.targetFrameRate = AppConst.LowFrameRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void StartUpGameMain()
|
private void StartUpGameMain()
|
||||||
{
|
{
|
||||||
if (!IsRestart)
|
if (!IsRestart)
|
||||||
{
|
{
|
||||||
GameIManager.Instance.InitialMain();
|
GameIManager.Instance.InitialMain();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GameIManager.Instance.EnterMain();
|
GameIManager.Instance.EnterMain();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Enable
|
#endregion Enable
|
||||||
|
|
||||||
#region SettingMode
|
#region SettingMode
|
||||||
|
|
||||||
private void InitSettingMode()
|
private void InitSettingMode()
|
||||||
{
|
{
|
||||||
if (!AppConst.UseInternalSetting) return;
|
if (!AppConst.UseInternalSetting) return;
|
||||||
InitResolutionMode();
|
InitResolutionMode();
|
||||||
InitFrameRateMode();
|
InitFrameRateMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool isHDMode;
|
private bool isHDMode;
|
||||||
private bool isHFRMode;
|
private bool isHFRMode;
|
||||||
|
|
||||||
private void InitResolutionMode()
|
private void InitResolutionMode()
|
||||||
{
|
{
|
||||||
isHDMode = PlayerPrefsKit.ReadBool(PrefsKeyConst.Application_isHDMode, true);
|
isHDMode = PlayerPrefsKit.ReadBool(PrefsKeyConst.Application_isHDMode, true);
|
||||||
SetResolutionMode(isHDMode);
|
SetResolutionMode(isHDMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitFrameRateMode()
|
private void InitFrameRateMode()
|
||||||
{
|
{
|
||||||
isHFRMode = PlayerPrefsKit.ReadBool(PrefsKeyConst.Application_isHFRMode, true);
|
isHFRMode = PlayerPrefsKit.ReadBool(PrefsKeyConst.Application_isHFRMode, true);
|
||||||
SetFrameRateMode(isHFRMode);
|
SetFrameRateMode(isHFRMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetResolutionMode(bool isHDMode)
|
private void SetResolutionMode(bool isHDMode)
|
||||||
{
|
{
|
||||||
if (isHDMode)
|
if (isHDMode)
|
||||||
{
|
{
|
||||||
ScreenConst.CurrResolution.x = ScreenConst.RawResolution.x * AppConst.HDHighViewScale;
|
ScreenConst.CurrResolution.x = ScreenConst.RawResolution.x * AppConst.HDHighViewScale;
|
||||||
ScreenConst.CurrResolution.y = ScreenConst.RawResolution.y * AppConst.HDHighViewScale;
|
ScreenConst.CurrResolution.y = ScreenConst.RawResolution.y * AppConst.HDHighViewScale;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ScreenConst.CurrResolution.x = ScreenConst.RawResolution.x * AppConst.HDLowViewScale;
|
ScreenConst.CurrResolution.x = ScreenConst.RawResolution.x * AppConst.HDLowViewScale;
|
||||||
ScreenConst.CurrResolution.y = ScreenConst.RawResolution.y * AppConst.HDLowViewScale;
|
ScreenConst.CurrResolution.y = ScreenConst.RawResolution.y * AppConst.HDLowViewScale;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetScreenResolution(ScreenConst.CurrResolution.x, ScreenConst.CurrResolution.y, true);
|
SetScreenResolution(ScreenConst.CurrResolution.x, ScreenConst.CurrResolution.y, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetFrameRateMode(bool isHFRMode)
|
private void SetFrameRateMode(bool isHFRMode)
|
||||||
{
|
{
|
||||||
Application.targetFrameRate = isHFRMode ? AppConst.HighFrameRate : AppConst.LowFrameRate;
|
Application.targetFrameRate = isHFRMode ? AppConst.HighFrameRate : AppConst.LowFrameRate;
|
||||||
|
|
||||||
|
|
||||||
QualitySettings.vSyncCount = 0;
|
QualitySettings.vSyncCount = 0;
|
||||||
QualitySettings.lodBias = 1;
|
QualitySettings.lodBias = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetScreenResolution(float width, float height, bool isFullScreen)
|
private void SetScreenResolution(float width, float height, bool isFullScreen)
|
||||||
{
|
{
|
||||||
StartCoroutine(OnSetScreenResolution(width, height, isFullScreen));
|
StartCoroutine(OnSetScreenResolution(width, height, isFullScreen));
|
||||||
}
|
}
|
||||||
|
|
||||||
private IEnumerator OnSetScreenResolution(float width, float height, bool isFullScreen)
|
private IEnumerator OnSetScreenResolution(float width, float height, bool isFullScreen)
|
||||||
{
|
{
|
||||||
yield return YieldConst.WaitForEndOfFrame;
|
yield return YieldConst.WaitForEndOfFrame;
|
||||||
var allCams = Camera.allCameras;
|
var allCams = Camera.allCameras;
|
||||||
if (allCams == null)
|
if (allCams == null)
|
||||||
{
|
{
|
||||||
yield break;
|
yield break;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var cam in allCams)
|
foreach (var cam in allCams)
|
||||||
{
|
{
|
||||||
cam.enabled = false;
|
cam.enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Screen.SetResolution((int)width, (int)height, isFullScreen);
|
Screen.SetResolution((int)width, (int)height, isFullScreen);
|
||||||
Screen.fullScreen = true;
|
Screen.fullScreen = true;
|
||||||
|
|
||||||
yield return YieldConst.WaitForEndOfFrame;
|
yield return YieldConst.WaitForEndOfFrame;
|
||||||
if (allCams == null)
|
if (allCams == null)
|
||||||
{
|
{
|
||||||
yield break;
|
yield break;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var cam in allCams)
|
foreach (var cam in allCams)
|
||||||
{
|
{
|
||||||
cam.enabled = true;
|
cam.enabled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion SettingMode
|
#endregion SettingMode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -44,7 +44,7 @@ namespace BallKingdomCrush
|
|||||||
TrackKit.TrackLoginFunnel(LoginFunnelEventType.LoadBegin); //加载开始打点
|
TrackKit.TrackLoginFunnel(LoginFunnelEventType.LoadBegin); //加载开始打点
|
||||||
|
|
||||||
var loginModel = LoginKit.Instance.LoginModel;
|
var loginModel = LoginKit.Instance.LoginModel;
|
||||||
Log.Info("Config", $"服务器传过来的配置表:{loginModel.Setting}");
|
Debug.Log($"服务器传过来的配置表:{loginModel.Setting}");
|
||||||
ConfigLoader.Instance.Init(new ConfigInitOptions
|
ConfigLoader.Instance.Init(new ConfigInitOptions
|
||||||
{
|
{
|
||||||
Setting = loginModel.Setting,
|
Setting = loginModel.Setting,
|
||||||
@@ -142,14 +142,18 @@ namespace BallKingdomCrush
|
|||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>true:非自然 false:自然</returns>
|
/// <returns>true:非自然 false:自然</returns>
|
||||||
public static bool IsOrganic()
|
private static bool IsOrganic()
|
||||||
{
|
{
|
||||||
bool b = false;
|
bool b = false;
|
||||||
|
|
||||||
if (GameHelper.IsGiftSwitch() && SuperApplication.Instance.attribution == "organic")
|
if (GameHelper.IsGiftSwitch())
|
||||||
{
|
{
|
||||||
b = GetCommonConf().IsOrganic == 1;
|
if (SuperApplication.Instance.attribution == "organic")
|
||||||
|
{
|
||||||
|
b = GetCommonConf().non == 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
// Debug.Log($"上传---------开关:{GetCommonConf().non}");
|
||||||
|
|
||||||
Debug.Log($"下载---------开关:{b}");
|
Debug.Log($"下载---------开关:{b}");
|
||||||
return b;
|
return b;
|
||||||
@@ -157,7 +161,7 @@ namespace BallKingdomCrush
|
|||||||
|
|
||||||
public static string GetConfigResVersion()
|
public static string GetConfigResVersion()
|
||||||
{
|
{
|
||||||
return IsOrganic() ? GetCommonConf().ResVersion : GetCommonConf().ResVersion1;
|
return IsOrganic() ? GetCommonConf().ResVersion1 : GetCommonConf().ResVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<T> GetConfig<T>() where T : class
|
public static List<T> GetConfig<T>() where T : class
|
||||||
@@ -167,7 +171,7 @@ namespace BallKingdomCrush
|
|||||||
|
|
||||||
private static List<T> GetConfigWithOrganicFallback<T, TOrganic>() where T : class
|
private static List<T> GetConfigWithOrganicFallback<T, TOrganic>() where T : class
|
||||||
{
|
{
|
||||||
if (!IsOrganic())
|
if (IsOrganic())
|
||||||
{
|
{
|
||||||
var organicConfig = ConfigLoader.Instance.GetConfig<List<TOrganic>>();
|
var organicConfig = ConfigLoader.Instance.GetConfig<List<TOrganic>>();
|
||||||
if (organicConfig != null)
|
if (organicConfig != null)
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"curCountry":2,"china":{"android_version":"","ios_version":"","androidXSetting":0,"country":1,"android_admob_app_id":"","ios_admob_app_id":""},"nonchina":{"android_version":"6.5.10","ios_version":"6.4.87","androidXSetting":1,"country":2,"android_admob_app_id":"ca-app-pub-3940256099942544~3347511713","ios_admob_app_id":""}}
|
{"curCountry":2,"china":{"android_version":"","ios_version":"","androidXSetting":0,"country":1,"android_admob_app_id":"","ios_admob_app_id":""},"nonchina":{"android_version":"6.5.10","ios_version":"6.4.87","androidXSetting":1,"country":2,"android_admob_app_id":"ca-app-pub-4727531460679709~6995531643","ios_admob_app_id":""}}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AApplication_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FUsers_003F97354_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F37cc348edc804f4cb176b63962c716e7177200_003F1a_003Fb93f31c4_003FApplication_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AApplication_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FUsers_003F97354_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F37cc348edc804f4cb176b63962c716e7177200_003F1a_003Fb93f31c4_003FApplication_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ACameraClearFlags_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FUsers_003F97354_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F37cc348edc804f4cb176b63962c716e7177200_003F58_003F4605d830_003FCameraClearFlags_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AConfigSystem_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FUsers_003F97354_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F45d8d9c6e50e4d1ebc0a5d7339f0472728a00_003F4b_003F6379d388_003FConfigSystem_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AConfigSystem_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FUsers_003F97354_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F45d8d9c6e50e4d1ebc0a5d7339f0472728a00_003F4b_003F6379d388_003FConfigSystem_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADateTimeOffset_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FUsers_003F97354_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F84fcf9255ea045aab003a751cdb5a2f6573620_003F1e_003F6b54b81f_003FDateTimeOffset_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADateTimeOffset_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FUsers_003F97354_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F84fcf9255ea045aab003a751cdb5a2f6573620_003F1e_003F6b54b81f_003FDateTimeOffset_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AEnumerable_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FUsers_003F97354_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fc6c8374a51994d45a37d1659d5e2b9f017ab98_003Fc5_003F9e2ca964_003FEnumerable_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AEnumerable_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FUsers_003F97354_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fc6c8374a51994d45a37d1659d5e2b9f017ab98_003Fc5_003F9e2ca964_003FEnumerable_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ PlayerSettings:
|
|||||||
loadStoreDebugModeEnabled: 0
|
loadStoreDebugModeEnabled: 0
|
||||||
visionOSBundleVersion: 1.0
|
visionOSBundleVersion: 1.0
|
||||||
tvOSBundleVersion: 1.0
|
tvOSBundleVersion: 1.0
|
||||||
bundleVersion: 1.0.9
|
bundleVersion: 1.1.0
|
||||||
preloadedAssets: []
|
preloadedAssets: []
|
||||||
metroInputSource: 0
|
metroInputSource: 0
|
||||||
wsaTransparentSwapchain: 0
|
wsaTransparentSwapchain: 0
|
||||||
@@ -170,7 +170,7 @@ PlayerSettings:
|
|||||||
iPhone: 0
|
iPhone: 0
|
||||||
tvOS: 0
|
tvOS: 0
|
||||||
overrideDefaultApplicationIdentifier: 1
|
overrideDefaultApplicationIdentifier: 1
|
||||||
AndroidBundleVersionCode: 9
|
AndroidBundleVersionCode: 10
|
||||||
AndroidMinSdkVersion: 24
|
AndroidMinSdkVersion: 24
|
||||||
AndroidTargetSdkVersion: 36
|
AndroidTargetSdkVersion: 36
|
||||||
AndroidPreferredInstallLocation: 1
|
AndroidPreferredInstallLocation: 1
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user