public FightNumber GetNumber(int ibit, HPNumberType type) { FightNumber ret = null; List <FightNumber> list = null; if (!mFightDict.ContainsKey(ibit)) { list = new List <FightNumber>(); mFightDict.Add(ibit, list); } list = mFightDict[ibit]; for (int index = 0; index < list.Count; index++) { if (!list[index].isShowing) { ret = list[index]; } } if (ret == null) { ret = UI_ShowPanel.inst.CreateFightNumber(type); list.Add(ret); } return(ret); }
public void showNumber(int inum, HPNumberType type, Vector3 position) { string num = inum.ToString(); int ibit = num.Length; FightNumberDict dict = null; if (!mNumberDict.ContainsKey(type)) { dict = new FightNumberDict(); mNumberDict.Add(type, dict); } dict = mNumberDict[type]; FightNumber number = dict.GetNumber(ibit, type); if (number && !number.isShowing) { number.onStart(num, position); } }