예제 #1
0
        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;
        }
예제 #2
0
        public BattleEquipment SetEquipment(string position, BattleEquipment equipment)
        {
            BattleEquipment oldEquipment = null;

            if (this.equipments.TryGetValue(position, out oldEquipment))
            {
            }
            this.equipments[position] = equipment;
            return(oldEquipment);
        }
예제 #3
0
 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;
 }