//================================= /* * m.atlas[atlas.name] = atlas.name; * m.data = {}; * m.data.name = spData.name; * m.data.path = spData.path; * * m.data.x = spData.x; * m.data.y = spData.y; * m.data.width = spData.width; * m.data.height = spData.height; * * m.data.borderLeft = spData.borderLeft * m.data.borderRight = spData.borderRight * m.data.borderTop = spData.borderTop * m.data.borderBottom = spData.borderBottom * * m.data.paddingLeft = spData.paddingLeft * m.data.paddingRight = spData.paddingRight * m.data.paddingTop = spData.paddingTop * m.data.paddingBottom = spData.paddingBottom * end * m.times = m.times or 0; * m.times = m.times + 1; * */ void initData() { isShowParckerView = false; isSelectedAll = false; currSelectSprite = null; packTex = null; packRects = null; packSprites.Clear(); mSpriteList.Clear(); if (string.IsNullOrEmpty(mSpritesBorrowInforFile)) { return; } string content = File.ReadAllText(mSpritesBorrowInforFile); Hashtable spriteMap = JSON.DecodeMap(content); Hashtable m = null; Hashtable data = null; mSpriteList = MapEx.vals2List(spriteMap); mSpriteList.Sort(new MySortSpriteBorrow()); // for (int i = 0; i < mSpriteList.Count; i++) { // m = mSpriteList [i] as Hashtable; // data = MapEx.getMap (m, "data"); // Debug.Log (MapEx.getString (data, "name") + "," + MapEx.getInt (m, "times")); // } }