public new void AddEquips() { EquipmentsFactory factory = new EquipmentsFactory(); foreach (var v in spawns) { Equips.Add(factory.SpawnProduct(v.equipType, v.value)); } baseE.AddEquips(); foreach (var v in baseE.spawns) { Equips.AddRange(baseE.Equips); } return; }
/// <summary> /// このオブジェクトのフィールドを設定する。 /// </summary> /// <param name="key">キー文字列</param> /// <param name="value">値</param> internal void SetValue(string key, object value) { switch (key) { case "id": Id = (int)((double)(value)); break; case "battlerName": BattlerName = (string)(value); break; case "characterIndex": CharacterIndex = (int)((double)(value)); break; case "characterName": CharacterName = (string)(value); break; case "classId": ClassId = (int)((double)(value)); break; case "equips": Equips.Clear(); Equips.AddRange((List <int>)(value)); break; case "faceIndex": FaceIndex = (int)((double)(value)); break; case "faceName": FaceName = (string)(value); break; case "traits": Traits.Clear(); Traits.AddRange((List <Trait>)(value)); break; case "initialLevel": InitialLevel = (int)((double)(value)); break; case "maxLevel": MaxLevel = (int)((double)(value)); break; case "name": Name = (string)(value); break; case "nickname": Nickname = (string)(value); break; case "note": Note = (string)(value); break; case "profile": Profile = (string)(value); break; default: throw new Exception($"Unknown key={key}"); } }