public EquipData(DynamicParatetrs dynamicParatetrs, string name, long openCost, int maxLevel, long increasingObjectCost, long increasingCost, Set set, TypeOfEquip typeOfEquip) : base(dynamicParatetrs, name, openCost, maxLevel, increasingObjectCost, increasingCost) { Set = set; TypeOfEquip = typeOfEquip; }
private EquipData AddEquip(string filename, IdCode idCode, string name, long openCost, int maxLevel, long increasingObjectCost, long increasingCost, Set set, TypeOfEquip typeOfEquip) { var dynamicParatetrs = TryRead <DynamicParatetrs>(filename, @dynamic => new DynamicParatetrs(@dynamic)); var equipData = new EquipData ( dynamicParatetrs, name, openCost, maxLevel, increasingObjectCost, increasingCost, set, typeOfEquip ); equipData.OnDataChanged.Subscribe(equip => Write(filename, equip.DynamicParatetrs)); equips.Add(idCode, equipData); return(equipData); }