/// <summary>
        /// 设置实体辅助器
        /// </summary>
        /// <param name="entityHelper">实体辅助器</param>
        public void SetEntityHelper(EntityHelperBase entityHelper)
        {
            if (entityHelper == null)
            {
                Debug.LogError("要设置的实体辅助器为空");
                return;
            }

            m_EntityHelper = entityHelper;
        }
Exemplo n.º 2
0
        public EntityInstanceObject(string name, object entityAsset, object entityInstance, EntityHelperBase entityHelper)
            : base(entityInstance, name)
        {
            if (entityAsset == null)
            {
                Debug.LogError("用来构造实体实例对象的实体资源为空");
            }
            if (entityHelper == null)
            {
                Debug.LogError("用来构造实体实例对象的实体辅助器为空");
            }

            m_EntityAsset  = entityAsset;
            m_EntityHelper = entityHelper;
        }
        public EntityManager()
        {
            m_EntityInfos             = new Dictionary <int, EntityInfo>();
            m_EntityGroups            = new Dictionary <string, EntityGroup>();
            m_EntitiesBeingLoaded     = new Dictionary <int, int>();
            m_EntitiesToReleaseOnLoad = new HashSet <int>();
            m_RecycleQueue            = new LinkedList <EntityInfo>();

            m_ObjectPoolManager  = FrameworkEntry.Instance.GetManager <ObjectPoolManager>();
            m_ResourceManager    = FrameworkEntry.Instance.GetManager <ResourceManager>();
            m_LoadAssetCallbacks = new LoadAssetCallbacks(LoadEntitySuccessCallback, LoadEntityDependencyAssetCallback, LoadEntityFailureCallback, LoadEntityUpdateCallback);
            m_EventManager       = FrameworkEntry.Instance.GetManager <EventManager>();

            m_EntityHelper = null;
            m_Serial       = 0;
        }