public void Recycle(LotteryNum ln) { ln.SetPos(new Vector3(1000f, 0f, 0f)); if (_uiPool != null) { _uiPool.Release(ln); } }
public LotteryNum CreatLn(int iNum) { if (_uiPool == null) { return(null); } LotteryNum ln = _uiPool.Get(); ln.SetNum(iNum); ln.gameObject.SetActive(true); return(ln); }
public static LotteryNum Creator(int iType) { GameObject prefab = Resources.Load("UI/LotteryNum", typeof(GameObject)) as GameObject; var go = Instantiate(prefab) as GameObject; go.transform.SetParent(UILotteryMgr.Instance.transform); //var rt = go.transform as RectTransform; //Helper.Normalize(rt); LotteryNum ln = go.AddComponent <LotteryNum>(); ln.Show(null); UILotteryMgr.Instance.Add(ln); return(ln); }
public void Remove(LotteryNum ln) { this._lns.Remove(ln); DestroyObject(ln.gameObject); }
public static void Destroy(LotteryNum ln) { DestroyObject(ln.gameObject); }
public static void Release(LotteryNum ln) { ln.gameObject.SetActive(false); }
public void Add(LotteryNum ln) { this._lns.Add(ln); }