using UnityEngine;
using System.Collections;

namespace mgaia.tk2d
{
    /// <summary>
    /// Extensões da classe Tk2dSpriteCollectionData
    /// </summary>
    /// <owner>Victor</owner>
    public static class Tk2dSpriteCollectionDataExtensions
    {
        /// <summary>
        /// Recarrega todas as texturas de uma sprite collection
        /// </summary>
        public static void ReloadTextures(this tk2dSpriteCollectionData spriteCollectionData)
        {
            foreach (Material mat in spriteCollectionData.inst.materialInsts)
            {
                mat.mainTexture = mat.mainTexture as Texture2D;
            };
        }
    }
}