123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using Api;
- using Game;
- using Message;
- using Plugins.CxShine.page;
- using UnityEngine;
- using UnityEngine.SceneManagement;
- namespace UI
- {
- public class GameStartJumper
- {
- public static void JumpGameScene(string battleSession)
- {
- PageManagerComp.singleton.HideUI();
- MessageComp.Instance.IntervalTime = 0.5f;
- Debug.Log("on jump game " + battleSession + "===");
- GameCore.Instance.curBattleSession = battleSession;
- SceneManager.LoadScene("Battle");
- }
- public static void BackToUI()
- {
- MessageComp.Instance.IntervalTime = 1f;
- SceneManager.LoadScene("Hall");
- PageManagerComp.singleton.DisplayUI();
- HallComp.Instance.BackToHallAndRefreshUI();
- }
- public static void PlayerQuitGame()
- {
- ApiComp.Instance.playerQuitGame(GameCore.Instance.curBattleSession, data =>
- {
- Debug.Log("player quit game success");
- BackToUI();
- }, (code, msg) =>
- {
- Debug.Log("player quit game fail");
- });
- }
- }
- }
|