Exemple #1
0
 public void Recycle(LotteryNum ln)
 {
     ln.SetPos(new Vector3(1000f, 0f, 0f));
     if (_uiPool != null)
     {
         _uiPool.Release(ln);
     }
 }
Exemple #2
0
        public LotteryNum CreatLn(int iNum)
        {
            if (_uiPool == null)
            {
                return(null);
            }
            LotteryNum ln = _uiPool.Get();

            ln.SetNum(iNum);
            ln.gameObject.SetActive(true);
            return(ln);
        }
Exemple #3
0
        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);
        }
Exemple #4
0
 public void Remove(LotteryNum ln)
 {
     this._lns.Remove(ln);
     DestroyObject(ln.gameObject);
 }
Exemple #5
0
 public static void Destroy(LotteryNum ln)
 {
     DestroyObject(ln.gameObject);
 }
Exemple #6
0
 public static void Release(LotteryNum ln)
 {
     ln.gameObject.SetActive(false);
 }
Exemple #7
0
 public void Add(LotteryNum ln)
 {
     this._lns.Add(ln);
 }