/// <summary> /// 游戏框架组件初始化。 /// </summary> protected override void Awake() { base.Awake(); m_SettingManager = ZFrameworkEntry.GetModule <ISettingManager>(); if (m_SettingManager == null) { Log.Fatal("Setting manager is invalid."); return; } SettingHelperBase settingHelper = Helper.CreateHelper(m_SettingHelperTypeName, m_CustomSettingHelper); if (settingHelper == null) { Log.Error("Can not create setting helper."); return; } settingHelper.name = string.Format("Setting Helper"); Transform transform = settingHelper.transform; transform.SetParent(this.transform); transform.localScale = Vector3.one; m_SettingManager.SetSettingHelper(settingHelper); }
private void Start() { BaseComponent baseComponent = GameEntry.GetComponent <BaseComponent>(); if (baseComponent == null) { Log.Fatal("Base component is invalid."); return; } m_EventComponent = GameEntry.GetComponent <EventComponent>(); if (m_EventComponent == null) { Log.Fatal("Event component is invalid."); return; } //m_UIManager.SetObjectPoolManager(GameFrameworkEntry.GetModule<IObjectPoolManager>()); //m_UIManager.InstanceAutoReleaseInterval = m_InstanceAutoReleaseInterval; //m_UIManager.InstanceCapacity = m_InstanceCapacity; //m_UIManager.InstanceExpireTime = m_InstanceExpireTime; //m_UIManager.InstancePriority = m_InstancePriority; m_UIManager.SetResourceManager(ZFrameworkEntry.GetModule <IResourceManager>()); UIFormHelperBase uiFormHelper = Helper.CreateHelper(m_UIFormHelperTypeName, m_CustomUIFormHelper); if (uiFormHelper == null) { Log.Error("Can not create UI form helper."); return; } uiFormHelper.name = string.Format("UI Form Helper"); Transform transform = uiFormHelper.transform; transform.SetParent(this.transform); transform.localScale = Vector3.one; m_UIManager.SetUIFormHelper(uiFormHelper); m_InstanceRoot = gameObject.transform.Find(string.Format("UI Form Instances")); if (m_InstanceRoot == null) { Log.Error("UI Form Instances Is Null"); } for (int i = 0; i < m_UIGroups.Length; i++) { if (!AddUIGroup(m_UIGroups[i].Name, m_UIGroups[i].Depth)) { Log.Warning("Add UI group '{0}' failure.", m_UIGroups[i].Name); continue; } } }
protected override void Awake() { base.Awake(); m_ResourceManager = ZFrameworkEntry.GetModule <IResourceManager>(); if (m_ResourceManager == null) { Log.Fatal("Resource manager is invalid."); return; } }
/// <summary> /// 游戏框架组件初始化。 /// </summary> protected override void Awake() { base.Awake(); m_ITimerManager = ZFrameworkEntry.GetModule <ITimerManager>(); if (m_ITimerManager == null) { Log.Fatal("FSM manager is invalid."); return; } }
/// <summary> /// 游戏框架组件初始化。 /// </summary> protected override void Awake() { base.Awake(); m_UIManager = ZFrameworkEntry.GetModule <IUIManager>(); if (m_UIManager == null) { Log.Fatal("UI manager is invalid."); return; } m_UIManager.OpenUIFormSuccess += OnOpenUIFormSuccess; m_UIManager.OpenUIFormFailure += OnOpenUIFormFailure; m_UIManager.OpenUIFormUpdate += OnOpenUIFormUpdate; m_UIManager.OpenUIFormDependencyAsset += OnOpenUIFormDependencyAsset; m_UIManager.CloseUIFormComplete += OnCloseUIFormComplete; }
/// <summary> /// 游戏框架组件初始化。 /// </summary> protected override void Awake() { base.Awake(); m_NetworkManager = ZFrameworkEntry.GetModule <INetworkManager>(); if (m_NetworkManager == null) { Log.Fatal("Network manager is invalid."); return; } m_NetworkManager.NetworkConnected += OnNetworkConnected; m_NetworkManager.NetworkClosed += OnNetworkClosed; m_NetworkManager.NetworkSendPacket += OnNetworkSendPacket; m_NetworkManager.NetworkMissHeartBeat += OnNetworkMissHeartBeat; m_NetworkManager.NetworkError += OnNetworkError; m_NetworkManager.NetworkCustomError += OnNetworkCustomError; }