Esempio n. 1
0
    void Awake()
    {
        TextAsset asset = new TextAsset();

        asset = (TextAsset)Resources.Load("WeaponData", typeof(TextAsset));
        doc.LoadXml(asset.text);
        //doc.Load(Application.dataPath + "/WeaponData.xml");

        Reset();

        ItemVendor vendor = GameObject.Find("Vendor").GetComponent <ItemVendor>();

        for (int i = 0; i < vendor.itemVendor.Count; i++)
        {
            fortData = vendor.itemVendor[i].GetComponent <FortificationData>();
            SetFortification(vendor.itemVendor[i].GetComponent <SellableItem>().itemName);
        }
    }
Esempio n. 2
0
 public void SetFortData(GameObject item)
 {
     fortData = item.GetComponent <FortificationData>();
 }