示例#1
0
        /// <summary>
        /// 初始化Entity;
        /// </summary>
        /// <param name="entityId"></param>
        /// <param name="uid"></param>
        /// <param name="name"></param>
        public void Initialize(int entityId, ulong uid, string name)
        {
            UID          = uid;
            EntityName   = name;
            EntityId     = entityId;
            Enable       = true;
            GameObjectEx = PoolMgr.singleton.GetCsharpObject <GameObjectEx>();

            InternalInitialize();
            GameObjectEx.AddLoadFinishHandler((goex) =>
            {
                InternalAttachGameObject(goex);
                _entityLoadFinishHandler?.Invoke(this, GameObjectEx.gameObject);
            });
            GameObjectEx.Init(this, AssetPath);
        }