Example #1
0
        public void cacheCartoon(Line l, NodeBase n, Cartoon cartoon, Rect rect)
        {
            if (cartoon != null)
            {
                CartoonData cd = PoolData <CartoonData> .Get();

                cd.Reset(n, cartoon, rect, l);
                DataList.Add(cd);
            }
        }
Example #2
0
        public void Add(Vector2 leftPos, float width, float height, Color color)
        {
            var sd = PoolData <SpriteData> .Get();

            sd.leftPos = leftPos;
            sd.color   = color;
            sd.width   = width;
            sd.height  = height;

            mData.Add(sd);
        }
Example #3
0
        public void cacheText(Line l, TextNode n, string text, Rect rect)
        {
            TextData td = PoolData <TextData> .Get();

            td.Reset(n, text, rect, l);
            DataList.Add(td);

            td.subMaterial = materials.IndexOf(n.d_font.material.mainTexture);
            if (td.subMaterial == -1)
            {
                td.subMaterial = materials.Count;
                materials.Add(n.d_font.material.mainTexture);
            }
        }
Example #4
0
        public void cacheISprite(Line l, NodeBase n, ISprite sprite, Rect rect)
        {
            var s = sprite.Get();

            if (s != null)
            {
                cacheSprite(l, n, sprite, rect);
            }
            else
            {
                ISpriteData cd = PoolData <ISpriteData> .Get();

                cd.Reset(n, sprite, rect, l);
                DataList.Add(cd);
            }
        }
Example #5
0
        public void cacheSprite(Line l, NodeBase n, Sprite sprite, Rect rect)
        {
            if (sprite != null)
            {
                SpriteData sd = PoolData <SpriteData> .Get();

                sd.Reset(n, sprite, rect, l);
                DataList.Add(sd);

                sd.subMaterial = materials.IndexOf(sprite.texture);
                if (sd.subMaterial == -1)
                {
                    sd.subMaterial = materials.Count;
                    materials.Add(sprite.texture);
                }
            }
        }
Example #6
0
        public PD(System.Action <T> free)
        {
            value = PoolData <T> .Get();

            this.free = free;
        }