public void Update(uint elapsed) { for (int i = 0; i < mAllList.Count; ++i) { QuackUI ui = mAllList[i] as QuackUI; if (!ui.IsEnd()) { ui.Update(elapsed); } } }
public void AddNewDamage(Vector3 pos, int val, bool isMana, bool isPlayer, bool critical, bool dead) { //等待新机制修改 QuackUI node = null; if (mCacheQueue.Count > 0) { node = mCacheQueue.Dequeue() as QuackUI; } else { GameObject clone = WindowManager.Instance.CloneCommonUI("QuackUI"); GameObject.DontDestroyOnLoad(clone); node = new QuackUI(clone); mAllList.Add(node); } NGUITools.SetActive(node.gameObject, true); node.Reset(this, pos, val, isMana, dead, isPlayer, critical, null); }
public void AddNewBuff(Vector3 pos, string bmpPath) { //等待新机制修改 QuackUI node = null; if (mCacheQueue.Count > 0) { node = mCacheQueue.Dequeue() as QuackUI; } else { GameObject clone = WindowManager.Instance.CloneCommonUI("QuackUI"); GameObject.DontDestroyOnLoad(clone); node = new QuackUI(clone); mAllList.Add(node); } NGUITools.SetActive(node.gameObject, true); node.Reset(this, pos, 0, false, false, false, false, bmpPath); }
public void FreeUI(QuackUI node) { NGUITools.SetActive(node.gameObject, false); mCacheQueue.Enqueue(node); }