public int this[CharacteristicType type] { get { return(characteristics[type]); } set { characteristics[type] = value; OnCharacteristicChanged?.Invoke(type, value); CharacterSheetStorage.SaveCharacter(Id); } }
public CharacterPickerWrapper(CharacterListController characterList, CharacterSheetController characterController) { this.characterList = characterList; this.characterController = characterController; characterList.OnAddItemPressed += () => { var sheet = CharacterSheetStorage.CreateNewCharacter(); characterList.AddItem(sheet); characterController.OpenCharacter(sheet); }; characterList.OnItemAdded += InitCharacterPreview; characterList.OnItemRemoved += RemoveCharacterPreview; }
private void RemoveCharacterPreview(CharacterPreviewHolder preview) { CharacterSheetStorage.RemoveCharacter(preview.sheetId); }