Exemplo n.º 1
0
        public GameObjectPool LoadOnlyPrefab(resourceCell cell, int entityResType)
        {
            GameObjectPool pool = null;

            pool = AddGameObjectPool(cell.prefabpath, entityResType);
            return(pool);
        }
Exemplo n.º 2
0
        public GameObjectPool PrefabAndTexture(resourceCell cell, int entityResType)
        {
            GameObjectPool pool = null;

            pool = AddGameObjectAndTexturePool(cell, entityResType);
            return(pool);
        }
Exemplo n.º 3
0
        protected GameObjectPool AddGameObjectAndTexturePool(resourceCell cell, int entityResType)
        {
            var go = ResourceManager.GetInstance().LoadGameObject(cell.prefabpath);

            go.transform.position = Const.Invisible_Postion;
            var pool = new GameObjectPool();

            pool.SetSeed(go);

            var texture = ResourceManager.GetInstance().LoadObject <Texture>(cell.texturepath);
            var smr     = go.GetComponentInChildren <SkinnedMeshRenderer>();

            smr.material.SetTexture("_MainTex", texture);
            gameObjectPools.Add(entityResType, pool);
            return(pool);
        }