Ejemplo n.º 1
0
        /// <summary>
        /// 构建界面管理器。
        /// </summary>
        public UIManager(IObjectPoolManager objectPoolManager)
        {
            m_UIGroups     = new Dictionary <string, UIGroup>();
            m_UIFormHelper = null;

            m_InstancePool = objectPoolManager.CreateSingle <UIFormInstanceObject>("UI Pool");
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 设置界面辅助器。
        /// </summary>
        /// <param name="uiFormHelper">界面辅助器。</param>
        public void SetUIFormHelper(IUIFormHelper uiFormHelper)
        {
            if (uiFormHelper == null)
            {
                throw new GameFrameworkException("UI form helper is invalid.");
            }

            m_UIFormHelper = uiFormHelper;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 设置界面辅助器。
        /// </summary>
        /// <param name="uiFormHelper">界面辅助器。</param>
        public void SetUIFormHelper(IUIFormHelper uiFormHelper)
        {
            if (uiFormHelper == null)
            {
                Log.Error("UI form helper is invalid.");
            }

            m_UIFormHelper = uiFormHelper;
        }
            public UIFormInstanceObject(string name, object target, IUIFormHelper uiFormHelper)
                : base(name, target)
            {
                if (uiFormHelper == null)
                {
                    throw new GameFrameworkException("UI form helper is invalid.");
                }

                m_UIFormHelper = uiFormHelper;
            }
Ejemplo n.º 5
0
            public UIFormInstanceObject(string name, object uiFormAsset, object uiFormInstance, IUIFormHelper helper)
                : base(name, uiFormInstance)
            {
                if (uiFormAsset)
                {

                }
                if (uiFormHelper)
                {

                }

                m_UIFormAsset = uiFormAsset;
                m_UIFormHelper = m_UIFormHelper;
            }
Ejemplo n.º 6
0
 /// <summary>
 /// 初始化界面管理器的新实例。
 /// </summary>
 public UIManager()
 {
     m_UIGroups     = new Dictionary <string, UIGroup>();
     m_RecycleQueue = new LinkedList <RecycleNode>();
     m_InstantiateAssetCallbacks = new InstantiateAssetCallbacks(InstantiateUIFormSuccessCallback, InstantiateUIFormFailureCallback, InstantiateUIFormUpdateCallback, InstantiateUIFormDependencyAssetCallback);
     m_ObjectPoolManager         = null;
     m_ResourceManager           = null;
     m_InstancePool = null;
     m_UIFormHelper = null;
     m_OpenUIFormSuccessEventHandler         = null;
     m_OpenUIFormFailureEventHandler         = null;
     m_OpenUIFormUpdateEventHandler          = null;
     m_OpenUIFormDependencyAssetEventHandler = null;
     m_CloseUIFormCompleteEventHandler       = null;
 }
            public UIFormInstanceObject(string name, object uiFormAsset, object uiFormInstance, IUIFormHelper uiFormHelper)
                : base(name, uiFormInstance)
            {
                if (uiFormAsset == null)
                {
                    throw new GameFrameworkException("UI form asset is invalid.");
                }

                if (uiFormHelper == null)
                {
                    throw new GameFrameworkException("UI form helper is invalid.");
                }

                m_UIFormAsset  = uiFormAsset;
                m_UIFormHelper = uiFormHelper;
            }
Ejemplo n.º 8
0
 /// <summary>
 /// 初始化界面管理器的新实例。
 /// </summary>
 public UIManager()
 {
     m_UIGroups                              = new Dictionary <string, UIGroup>();
     m_UIFormsBeingLoaded                    = new List <int>();
     m_UIFormAssetNamesBeingLoaded           = new List <string>();
     m_UIFormsToReleaseOnLoad                = new HashSet <int>();
     m_RecycleQueue                          = new LinkedList <IUIForm>();
     m_LoadAssetCallbacks                    = new LoadAssetCallbackEvent(LoadUIFormSuccessCallback, LoadUIFormFailureCallback, LoadUIFormUpdateCallback, LoadUIFormDependencyAssetCallback);
     m_UIFormHelper                          = null;
     m_ResourceManager                       = null;
     m_OpenUIFormSuccessEventHandler         = null;
     m_OpenUIFormFailureEventHandler         = null;
     m_OpenUIFormUpdateEventHandler          = null;
     m_OpenUIFormDependencyAssetEventHandler = null;
     m_CloseUIFormCompleteEventHandler       = null;
 }
            public UIFormInstanceObject(string name, object uiFormAsset, object uiFormInstance, IUIFormHelper uiFormHelper)
            {
                if (uiFormAsset == null)
                {
                    Log.Error("UI form asset is invalid.");
                }

                if (uiFormHelper == null)
                {
                    Log.Error("UI form helper is invalid.");
                }

                m_Name         = name;
                m_Target       = uiFormInstance;
                m_UIFormAsset  = uiFormAsset;
                m_UIFormHelper = uiFormHelper;
            }
Ejemplo n.º 10
0
 /// <summary>
 /// 初始化界面管理器的新实例。
 /// </summary>
 public UIManager()
 {
     m_UIGroups               = new Dictionary <string, UIGroup>();
     m_UIFormsBeingLoaded     = new Dictionary <int, string>();
     m_UIFormsToReleaseOnLoad = new HashSet <int>();
     m_RecycleQueue           = new Queue <IUIForm>();
     m_LoadAssetCallbacks     = new LoadAssetCallbacks(LoadUIFormSuccessCallback, LoadUIFormFailureCallback, LoadUIFormUpdateCallback, LoadUIFormDependencyAssetCallback);
     m_ObjectPoolManager      = null;
     m_ResourceManager        = null;
     m_InstancePool           = null;
     m_UIFormHelper           = null;
     m_Serial = 0;
     m_OpenUIFormSuccessEventHandler         = null;
     m_OpenUIFormFailureEventHandler         = null;
     m_OpenUIFormUpdateEventHandler          = null;
     m_OpenUIFormDependencyAssetEventHandler = null;
     m_CloseUIFormCompleteEventHandler       = null;
 }
Ejemplo n.º 11
0
 public override void Clear()
 {
     base.Clear();
     m_UIFormAsset  = null;
     m_UIFormHelper = null;
 }
Ejemplo n.º 12
0
            public static UIFormInstanceObject Create(string name, object uiFormAsset, object uiFormInstance, IUIFormHelper uiFormHelper)
            {
                if (uiFormAsset == null)
                {
                    throw new GameFrameworkException("UI form asset is invalid.");
                }

                if (uiFormHelper == null)
                {
                    throw new GameFrameworkException("UI form helper is invalid.");
                }

                UIFormInstanceObject uiFormInstanceObject = ReferencePool.Acquire <UIFormInstanceObject>();

                uiFormInstanceObject.Initialize(name, uiFormInstance);
                uiFormInstanceObject.m_UIFormAsset  = uiFormAsset;
                uiFormInstanceObject.m_UIFormHelper = uiFormHelper;
                return(uiFormInstanceObject);
            }
Ejemplo n.º 13
0
 public UIFormInstanceObject()
 {
     m_UIFormAsset  = null;
     m_UIFormHelper = null;
 }
Ejemplo n.º 14
0
 public UIFormInstanceObject(string name, object uiFormInstance, IUIFormHelper uiFormHelper)
     : base(name, uiFormInstance)
 {
     this.uiFormHelper = uiFormHelper;
 }
Ejemplo n.º 15
0
        public void SetUIFormHelper(IUIFormHelper uiFormHelper)
        {

        }
Ejemplo n.º 16
0
        /// <summary>
        /// 设置界面辅助器。
        /// </summary>
        /// <param name="uiFormHelper">界面辅助器。</param>
        public void SetUIFormHelper(IUIFormHelper uiFormHelper)
        {
            Guard.Verify <ArgumentException>(uiFormHelper == null, "UI form helper is invalid.");

            this.m_UIFormHelper = uiFormHelper;
        }