123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using LitJson;
- using ShadowStudio.Model;
- using ShadowStudio.UI;
- using UnityEngine;
- using XRTool.Util;
- public class ItemFileList : UnitySingleton<ItemFileList>
- {
- private int goods_id;
- public GameObject Itemfile;
- public List<GameObject> Itemfilelist;
- protected override void Awake()
- {
- base.Awake();
- Itemfilelist = new List<GameObject>();
- }
- public void AddFileIcon(Texture2D texture2, ArtContainer artContainer)
- {
- GameObject obj = Instantiate(Itemfile, transform) as GameObject;
- Itemfilelist.Add(obj);
- obj.transform.GetComponent<ItemFileView>().Init(texture2, artContainer, ConsoleDlg.IsOne);
- if (ConsoleDlg.IsOne)
- {
- ConsoleDlg.IsOne = false;
- }
- }
- public void DeleteFileIcon(ArtContainer artContainer)
- {
- if (artContainer.CanEditor())
- {
- if (ArtEditorContainer.Instance)
- {
- ArtEditorContainer.Instance.gameObject.SetActive(false);
- }
- if (ArtMoreEditor.Instance)
- {
- ArtMoreEditor.Instance.DeleteRefesh();
- }
- GoodsInfo goodsInfo = artContainer.GetGoodsInfo();
- goods_id = goodsInfo.id;
- WSHandler.Room.DeleteGood(new int[] { goods_id });
- }
- }
- }
|