Ejemplo n.º 1
0
        void Awake()
        {
            Instance = this;

            if (ObjectPools == null)
            {
                ObjectPools = new List <ObjectPool>();
            }

            for (int i = 0; i < ObjectPools.Count; i++)
            {
                if (ObjectPools[i].Prefab == null)
                {
                    continue;
                }

                if (!ObjectPools[i].IsInitialized)
                {
                    ObjectPools[i].Initialize(ObjectPools[i].Prefab, transform);
                }
            }
        }
Ejemplo n.º 2
0
        void Awake()
        {
            Instance = this;

            if ( ObjectPools == null )
                ObjectPools = new List<ObjectPool>();

            for ( int i = 0; i < ObjectPools.Count; i++ )
            {
                if ( ObjectPools[ i ].Prefab == null )
                    continue;

                if ( !ObjectPools[ i ].IsInitialized )
                    ObjectPools[ i ].Initialize( ObjectPools[ i ].Prefab, transform );
            }
        }