Exemplo n.º 1
0
 } 

 public void Init() 

 {
     
 XElement wc = WeaponContainer.Load(path); 

 WeaponInfos = wc.Element("Weapons").Elements("Weapon").Select(c => new Weapon().Set(c)).ToDictionary(info => info.id); 


 }
Exemplo n.º 2
0
 public Dictionary <int, Weapon> GetDict() 

 {
     
 XElement wc = WeaponContainer.Load(path); 

 WeaponInfos = wc.Element("Weapons").Elements("Weapon").Select(c => new Weapon().Set(c)).ToDictionary(info => info.id); 

        return(WeaponInfos); 

 }
Exemplo n.º 3
0
 void Awake()
 {
     collection = WeaponContainer.Load(Path.Combine(Application.dataPath, "weapons.xml"));
     weapons    = collection.weapons;
     GiveWeapon(weapons[0]);
 }