Exemplo n.º 1
0
 public void Dispose()
 {
     for (int i = 0; i < Titles.Count; i++)
     {
         ModelManagerUI.RecycleGameObject(Titles[i].target);
     }
     for (int i = 0; i < Items.Count; i++)
     {
         ModelManagerUI.RecycleGameObject(Items[i].target);
     }
     Titles.Clear();
     Items.Clear();
 }
Exemplo n.º 2
0
 public void Clear()
 {
     for (int i = 0; i < items.Count; i++)
     {
         ModelManagerUI.RecycleGameObject(items[i].main);
     }
     items.Clear();
     point = 0;
     start = 0;
     end   = 0;
     ch    = 0;
     datas.Clear();
 }
Exemplo n.º 3
0
        void Order()
        {
            float vy = View.sizeDelta.y;
            int   c  = items.Count - 1;
            int   ss = 0;

            for (int i = c; i >= 0; i--)
            {
                var   item = items[i];
                float sy   = item.offset;
                float ey   = sy + item.high;
                if (sy - point > vy)
                {
                    ModelManagerUI.RecycleGameObject(item.main);
                    items.RemoveAt(i);
                }
                else if (ey < point)
                {
                    ModelManagerUI.RecycleGameObject(item.main);
                    items.RemoveAt(i);
                }
                else
                {
                    float oy = 0.5f * vy - sy + point;
                    item.pos.y = oy;
                    item.main.transform.localPosition = new Vector3(0, oy, 0);
                    ss = item.Index;
                }
            }
            ss -= 10;
            if (ss < 0)
            {
                ss = 0;
            }
            float over = point + vy;

            for (; ss < datas.Count; ss++)
            {
                var item = datas[ss];
                if (item.offset > over)
                {
                    break;
                }
                if (item.offset + item.high > point)
                {
                    UpdateItem(item, ss);
                }
            }
        }
Exemplo n.º 4
0
 public virtual void Dispose()
 {
     if (main != null)
     {
         ModelManagerUI.RecycleGameObject(main);
     }
     point--;
     if (buff[point] != null)
     {
         buff[point].Index = Index;
     }
     buff[Index] = buff[point];
     buff[point] = null;
     Resources.UnloadUnusedAssets();
 }
Exemplo n.º 5
0
 public override void Dispose()
 {
     if (pops != null)
     {
         for (int i = 0; i < pops.Count; i++)
         {
             pops[i].Dispose();
         }
     }
     pops.Clear();
     currentPop = null;
     ModelManagerUI.RecycleGameObject(main);
     main = null;
     ClearUI();
 }
Exemplo n.º 6
0
        public static void Update()
        {
            Scale.MainUpdate();

            UserAction.Update();
            RenderForm.LoadAction();
            InputCaret.UpdateCaret();
            Keyboard.DispatchEvent();
            RenderForm.ApplyAll();
            ThreadMission.ExtcuteMain();
            ModelManagerUI.RecycleGameObject();
            AnimationManage.Manage.Update();
            AllTime += Time.deltaTime;
            mission.AddSubMission(SubThread, null);
        }
Exemplo n.º 7
0
 public void Clear()
 {
     for (int i = 0; i < Items.Count; i++)
     {
         var g = Items[i];
         ModelManagerUI.RecycleGameObject(g.target);
     }
     for (int i = 0; i < Recycler.Count; i++)
     {
         var g = Recycler[i];
         ModelManagerUI.RecycleGameObject(g.target);
     }
     Items.Clear();
     Recycler.Clear();
     Model.child.Clear();
 }
Exemplo n.º 8
0
        void Initialtems()
        {
            int c = max_count;

            for (int i = 0; i < c; i++)
            {
                if (i >= Items.Count)
                {
                    GameObject g = ModelManagerUI.LoadToGame(ItemMod, null);
                    var        t = g.transform;
                    t.SetParent(View);
                    t.localScale = new Vector3(1, 1, 1);
                    Item a = new Item();
                    a.target = g;
                    Items.Add(a);
                }
            }
            for (int i = Items.Count - 1; i >= c; i--)
            {
                var g = Items[i];
                Items.RemoveAt(i);
                ModelManagerUI.RecycleGameObject(g.target);
            }
        }