示例#1
0
文件: NGUIDevice.cs 项目: fengqk/Art
 public override HtImage LoadImageEx(string src, int fps, bool snap, int w, int h) {
     // try get from cache
     HtImage ret;
     if (images.TryGetValue(src, out ret)) return ret;
     // fail with cache, so create new and store into cache
     ret = new NGUIImage(src, fps,snap,w,h);
     images[src] = ret;
     return ret;
 }
示例#2
0
        /// <summary>
        /// Load image
        /// </summary>
        /// <param name="src">src attribute from img tag</param>
        /// <param name="fps">fps attribute from img tag</param>
        /// <returns>Loaded image</returns>
        public override HtImage LoadImage(string src, int fps)
        {
            // try get from cache
            NGUIImage ret;

            if (images.TryGetValue(src, out ret))
            {
                return(ret);
            }
            // fail with cache, so create new and store into cache
            ret         = new NGUIImage(src, fps);
            images[src] = ret;
            return(ret);
        }