|
|
@@ -42,10 +42,11 @@ public class GameApplction : IGameStart
|
|
|
|
|
|
private GameStartUIPanel gameStartUIPanel;
|
|
|
private System.Action LoadFinish;
|
|
|
+
|
|
|
public async void StartGame(LoadType LoadType, string h5Url, GameStartUIPanel gameStartUIPanel,
|
|
|
System.Action LoadFinish)
|
|
|
{
|
|
|
- HotSyncContent.DownloadUI= gameStartUIPanel;
|
|
|
+ HotSyncContent.DownloadUI = gameStartUIPanel;
|
|
|
this.LoadFinish = LoadFinish;
|
|
|
gameApplction = this;
|
|
|
Debug.Log("开始游戏逻辑");
|
|
|
@@ -53,7 +54,7 @@ public class GameApplction : IGameStart
|
|
|
// Crasheye.SendScriptException("测试错误", "测试错误", "ZH");
|
|
|
// UnityEngine.Screen.SetResolution(Screen.width);
|
|
|
// GameUpdateAsset.Instance.Init(h5Url);
|
|
|
-
|
|
|
+
|
|
|
this.gameStartUIPanel = gameStartUIPanel;
|
|
|
gameStartUIPanel.ShowMassge("开始加载资源");
|
|
|
gameStartUIPanel.SetSlider(0);
|
|
|
@@ -64,7 +65,6 @@ public class GameApplction : IGameStart
|
|
|
GameAssetUpdatePanel gameAssetUpdatePanel = new GameAssetUpdatePanel();
|
|
|
gameAssetUpdatePanel.StartUpdateAsset(AssetUpdateFinish);
|
|
|
// await InitGameApplication();
|
|
|
-
|
|
|
|
|
|
|
|
|
Debug.Log("初始化完成");
|
|
|
@@ -142,12 +142,18 @@ public class GameApplction : IGameStart
|
|
|
// return;
|
|
|
// }
|
|
|
|
|
|
- //登录
|
|
|
+#if UNITY_ANDROID && !UNITY_EDITOR&& Taptap
|
|
|
+ //登录
|
|
|
await TapSDKManager.Instance.Login();
|
|
|
|
|
|
//获取玩家数据
|
|
|
await CloudSaveManager.Instance.LoadOrCreateArchiveAsync();
|
|
|
|
|
|
+#else
|
|
|
+ AccountFileInfo.Instance.LoadPlayerData();
|
|
|
+#endif
|
|
|
+
|
|
|
+
|
|
|
EventManager.Instance.RemoveEventListener(CustomEventType.DialoguePanelOpen, DialoguePanelOpenEvent);
|
|
|
EventManager.Instance.AddEventListener(CustomEventType.DialoguePanelOpen, DialoguePanelOpenEvent);
|
|
|
UIManager.Instance.Canvas.gameObject.SetActive(true);
|