private void LoadEquipment(JSONNode N) { string id = N[BattleConstants.ID]; string name = N[BattleConstants.NAME]; float range = float.Parse(N[BattleConstants.RANGE]); Dictionary <string, float> abilitiesIncrement = this.GetDictionaryFloat((JSONClass)N.AsObject[BattleConstants.ABILITIES_INCREMENT]); BattleEquipment equipment = new BattleEquipment(id, name, range, abilitiesIncrement); equipments[id] = equipment; }
public BattleEquipment SetEquipment(string position, BattleEquipment equipment) { BattleEquipment oldEquipment = null; if (this.equipments.TryGetValue(position, out oldEquipment)) { } this.equipments[position] = equipment; return(oldEquipment); }
private void LoadEquipment(JSONNode N) { string id = N[BattleConstants.ID]; string name = N[BattleConstants.NAME]; float range = float.Parse(N[BattleConstants.RANGE]); Dictionary<string, float> abilitiesIncrement = this.GetDictionaryFloat((JSONClass)N.AsObject[BattleConstants.ABILITIES_INCREMENT]); BattleEquipment equipment = new BattleEquipment(id, name, range, abilitiesIncrement); equipments[id] = equipment; }