Example #1
0
 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;
 }
Example #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);
        }