Exemplo n.º 1
0
 private void DeleteItem(int id)
 {
     if (m_ItemDic.ContainsKey(id))
     {
         IsoUploadItem_N item = m_ItemDic[id];
         m_ItemDic.Remove(id);
         Destroy(item.gameObject);
         Invoke("Reposition", 0.1f);
     }
 }
Exemplo n.º 2
0
    public void UpdateIsoState(int id, string isoName, int step)
    {
        UploadState state = (step <0 || step> (int)(UploadState.NotEnoughMaterials)) ? UploadState.None : (UploadState)step;

        if (m_ItemDic.ContainsKey(id))
        {
            m_ItemDic[id].UpdateStep(state);
        }
        else
        {
            IsoUploadItem_N item = GetNewItem();
            item.DelEvent = DeleteItem;
            item.UpdateInfo(id, isoName, state);
            m_ItemDic.Add(id, item);
            Reposition();
        }
    }