/// <summary> /// Override funzione che esegue il setup del pannello /// </summary> public override void CustomSetup(UIManagerBase _manage) { base.CustomSetup(_manage); ToggleBossPanel(false); ToggleWinPanel(false); reloadingImage.gameObject.SetActive(false); }
public void SetInit(AmUiOption pOption, UIManagerBase pMan) { Optn = pOption; Pstn = new CuVect(gameObject, Optn); Size = new CuVect(gameObject, Optn, IsPosi: false); //muiManager = pMan; //muiManager.delSetState += pStt => { muiState = pStt; }; }
/// <summary> /// Updates UI position based on the device screen orientation. /// </summary> private void UpdateUIOrientation() { // Check if screen orientation changes UIManagerBase uimb = Locator.GetUIManager(); if (uimb != null && uimb.HasScreenOrientationChanged) { UpdateScreenPosition(); } }
public void AddACell(GameObject pObj, int x, int y, string kind, bool?pSortOrStock = null) { UIManagerBase curMan = arrMan [arrMan.Count - 1]; Vector3 pstn; curMan.GetPosition(x, y, out pstn); pObj.transform.position = pstn; pObj.GetComponent <CuCell> ().muiSortOrStuck = pSortOrStock; pObj.CellCs().myKind = kind; curMan.AddAMember(pObj); }
/// <summary> /// Updates the orthographic size when device screen orientation changes. /// </summary> private void UpdateOrthoSize() { // Check if screen orientation changes UIManagerBase uimb = Locator.GetUIManager(); if (uimb != null && uimb.HasScreenOrientationChanged) { // Update orthographic size according to the new orientation m_uiCamera.orthographicSize = IsLandscape ? m_landscapeOrthoSize : m_portraitOrthoSize; } }
private bool ReturnWindowManager(UIBaseWindow baseWindow) { // 退出当前界面子界面 UIManagerBase baseWindowManager = baseWindow.GetWindowManager; bool isValid = false; if (baseWindowManager != null) { isValid = baseWindowManager.ReturnWindow(); } return(isValid); }
/// <summary> /// Updates the initialization process. /// </summary> private void UpdateInitState() { switch (m_initState) { case InitState.NONE: AdvanceInitState(); break; case InitState.INIT_SHARED_SYSTEMS: #if SHOW_STATE_LOGS Debug.Log("Initializing shared systems..."); #endif // Find or create containers for shared MonoBehaviour systems GameObject uiManagerObj = GameObject.Find(UI_MANAGER_OBJ_NAME); if (uiManagerObj == null) { uiManagerObj = new GameObject(UI_MANAGER_OBJ_NAME); } GameObject soundManagerObj = GameObject.Find(SOUND_MANAGER_OBJ_NAME); if (soundManagerObj == null) { soundManagerObj = new GameObject(SOUND_MANAGER_OBJ_NAME); } // Create and store references to shared systems m_uiManager = uiManagerObj.AddComponentNoDupe <UIManager>(); m_soundManager = soundManagerObj.AddComponentNoDupe <SoundManager>(); m_dataSystem = new SoomlaDataSystem(); m_notifSystem = new NotificationSystem(); m_playServicesSystem = new PlayServicesSystem(); // Shared systems are not destroyed on scene switches DontDestroyOnLoad(uiManagerObj); DontDestroyOnLoad(soundManagerObj); // Initialize shared systems m_uiManager.Initialize(); m_soundManager.Initialize(); m_dataSystem.Initialize(); m_playServicesSystem.Initialize(m_enableSavedGames); m_notifSystem.Initialize(m_enablePushNotifs); // Add FPSDisplay component m_fpsDisplay = this.gameObject.AddComponentNoDupe <FPSDisplay>(); AdvanceInitState(); break; case InitState.WAIT_INIT_SHARED_SYSTEMS: #if SHOW_STATE_LOGS Debug.Log("Waiting for shared system initialization to finish..."); #endif // Wait for shared systems to finish initialization if (m_uiManager.IsInitialized && m_soundManager.IsInitialized && m_dataSystem.IsInitialized && m_playServicesSystem.IsInitialized && m_notifSystem.IsInitialized) { AdvanceInitState(); } break; case InitState.INIT_LOCATOR: #if SHOW_STATE_LOGS Debug.Log("Initializing Service Locator..."); #endif Locator.ProvideUIManager(m_uiManager); Locator.ProvideSoundManager(m_soundManager); Locator.ProvideDataSystem(m_dataSystem); Locator.ProvidePlayServicesSystem(m_playServicesSystem); Locator.ProvideNotifSystem(m_notifSystem); // If game is loaded from the Main scene (index 0) if (Application.loadedLevel == 0) { AdvanceInitState(); } // If game is loaded from a different scene else { // No need to load a different scene // Just load the SceneMaster m_initState = InitState.LOAD_SCENE_MASTER; } break; // The following states are cycled through whenever scenes are switched case InitState.LOAD_SCENE: #if SHOW_STATE_LOGS Debug.Log("Loading scene..."); #endif // Block input while next scene is loading m_uiManager.SetBlockInput(); StartLoading(m_sceneInfo.GetSceneNameOf(m_nextScene)); AdvanceInitState(); break; case InitState.WAIT_LOAD_SCENE: // Wait for scene to finish loading in the background #if SHOW_STATE_LOGS Debug.Log("Waiting for scene to load in the background..."); #endif if (m_async != null && m_async.progress >= READY_TO_LOAD_PROGRESS) { // Start fade out if (m_enableFadeAnim) { // There is nothing to fade out if starting from Main scene if (Application.loadedLevel != 0) { m_uiManager.StartFadeOut(true); } } AdvanceInitState(); } break; case InitState.UNLOAD_CUR_SCENE: #if SHOW_STATE_LOGS Debug.Log("Unloading current scene..."); #endif // If starting from Main scene, there will be nothing to unload if (Application.loadedLevel == 0 || m_sceneMaster.Unload()) { AdvanceInitState(); } break; case InitState.WAIT_UNLOAD_CUR_SCENE: #if SHOW_STATE_LOGS Debug.Log("Waiting for current scene to finish unloading..."); #endif // If starting from Main scene, there will be nothing to unload if (Application.loadedLevel == 0 || !m_sceneMaster.IsInitialized) { // If scene fading is enabled, wait for scene to fade out first if (!m_enableFadeAnim || (m_enableFadeAnim && m_uiManager.IsFadedOut())) { // Clean up non-persistent sounds m_soundManager.DeleteAllSoundObjects(false); AdvanceInitState(); } } break; case InitState.SWITCH_SCENE: // Load the next scene #if SHOW_STATE_LOGS Debug.Log("Switching scene..."); #endif ActivateScene(); // Initialization will continue in OnLevelWasLoaded break; case InitState.LOAD_SCENE_MASTER: #if SHOW_STATE_LOGS Debug.Log("Loading scene master in scene " + Application.loadedLevelName); #endif if (m_sceneMaster.Load()) { // Provide SceneMaster to the service locator Locator.ProvideSceneMaster(m_sceneMaster); AdvanceInitState(); } break; case InitState.WAIT_LOAD_SCENE_MASTER: #if SHOW_STATE_LOGS Debug.Log("Waiting for scene master to load..."); #endif if (m_sceneMaster.IsInitialized) { // Start fade in if (m_enableFadeAnim) { m_uiManager.StartFadeIn(); } // Fire the SceneInitialized event if (sceneInitializedInvoker != null) { sceneInitializedInvoker(this, new System.EventArgs()); } AdvanceInitState(); } break; case InitState.DONE: #if SHOW_STATE_LOGS if (BuildInfo.IsDebugMode) { Debug.Log("Main initialization complete"); } #endif // Switch to IDLE state // If the SceneMaster switches the scene, this state change will be overridden AdvanceInitState(); // Keep track of previous scene m_prevScene = m_curScene; // Update scene enum for the current scene m_curScene = m_nextScene; // Start the scene - pass control over to the active scene master m_sceneMaster.StartScene(); break; case InitState.IDLE: break; } }
/// <summary> /// Override della funzione di Setup dell'UIControllerBase /// </summary> public override void CustomSetup(UIManagerBase _controller) { controller = _controller as UI_Controller; eventSystem = controller.GetEventSystem(); }
public static FlowCampShop Create() => default; // 0x008135D0-0x00813680 // [IteratorStateMachine] // 0x0061E6A0-0x0061E710 public override IEnumerator Play(UIManagerBase menuBase, FlowPlayParam param) => default; // 0x00813680-0x00813700
public static void ProvideUIManager(UIManagerBase uiManager) { m_uiManager = uiManager; }
private void OnEnable() { _instance = this; }
public virtual void Setup() { _instance = this; }
/// <summary> /// Funzione chimata al setup della classe base /// </summary> public virtual void CustomSetup(UIManagerBase _manager) { }
/// <summary> /// Setup del menu /// </summary> public void Setup(UIManagerBase _manager) { CustomSetup(_manager); }
} // 0x009995C0-0x009995D0 public abstract IEnumerator Play(UIManagerBase menuBase, FlowPlayParam param);
} // 0x009A5CB0-0x009A5D30 // Methods // [IteratorStateMachine] // 0x0061FDC0-0x0061FE30 public override IEnumerator Play(UIManagerBase m, FlowPlayParam param) => default; // 0x009A5C10-0x009A5C80
public IEnumerator Shop(ShopType shopType, FlowPlay.FlowPlayParam param) => default; // 0x009A30C0-0x009A3130 public static void SwitchCreate(ShopType shopType, out UIManagerBase ui, out FlowPlay flow, out bool system, FlowPlay.FlowPlayParam param = null) { ui = default; flow = default; system = default; } // 0x0099E080-0x0099E440