コード例 #1
0
        /////////////////////////////////////////

        Component_Image DynamicTexture_GetFree(DynamicTextureType type, Component_Image.TypeEnum imageType, Vector2I size, PixelFormat format, int fsaaLevel, bool mipmaps, int arrayLayers, bool createSimple3DRenderer, bool createCanvasRenderer)
        {
            //var item = renderTargetsFree.Find( i => i.type == type && i.size == size && i.format == format && i.fsaaLevel == fsaaLevel );
            DynamicTextureItem item = null;

            foreach (var i in dynamicTexturesFree)
            {
                if (i.type == type && i.imageType == imageType && i.size == size && i.format == format && i.fsaaLevel == fsaaLevel && i.mipmaps == mipmaps && i.arrayLayers == arrayLayers && i.createSimple3DRenderer == createSimple3DRenderer && i.createCanvasRenderer == createCanvasRenderer)
                {
                    item = i;
                    break;
                }
            }

            if (item != null)
            {
                dynamicTexturesFree.Remove(item);
                item.usedLastUpdate = true;
                return(item.image);
            }
            return(null);
        }
コード例 #2
0
        //!!!!
        //public bool HierarchyVisible
        //{
        //	get { return hierarchyVisible; }
        //	set
        //	{
        //		if( hierarchyVisible == value )
        //			return;
        //		hierarchyVisible = value;

        //		rootComponent._UpdateVisibleInHierarchy( false );
        //	}
        //}

        void ProcessObjectsDeletionQueue()
        {
            while (objectsDeletionQueue.Count != 0)
            {
                var e = objectsDeletionQueue.GetEnumerator();
                e.MoveNext();
                Component c = e.Current;

                if (c.Parent != null)
                {
                    c.RemoveFromParent(false);
                }
                else
                {
                    objectsDeletionQueue.Remove(c);
                }
            }
        }