Example #1
0
    public static ItemXML Load(TextAsset _xmlFile)
    {
        XmlSerializer serializer = new XmlSerializer(typeof(ItemXML));
        StringReader  reader     = new StringReader(_xmlFile.text);
        ItemXML       createItem = serializer.Deserialize(reader) as ItemXML;

        return(createItem);
    }
Example #2
0
 //아이템 추가 하는 함수
 public void AddItem(ItemXML item)
 {
     itemContainer.items.Add(item);
     Save();
     Load();
 }
Example #3
0
 private void Awake()
 {
     instance = this;
     asset    = Resources.Load <TextAsset>("XML/ItemDatabase");
     itemXML  = ItemXML.Load(asset);
 }