public void ToggleActiveObject(bool isShop, ModelSwitcher switcher) { _isShop = isShop; _switcher = switcher; if (!SaveDataStorage.HasKeyBuyableObjecty(_defaultSkin)) { _currentIdSkin = _defaultSkin.Id; _avatar.SetSkin(_defaultSkin); SaveDataStorage.SaveBuyableObject(_defaultSkin); ToggleActiveObject(_isShop, _switcher); } else { _currentIdSkin = SaveDataStorage.LoadCurrentRunnersId(); _openedAvatars = SaveDataStorage.LoadOpenedRunnersIds(); _avatar.SetSkin(_skins.Where(a => a.Id == _currentIdSkin).First()); ChangePrice(); } }
public void SaveBuyableObject(IBuyableObject buyable) { SaveDataStorage.SaveBuyableObject(buyable); }
public void DeleteBooster() { SaveDataStorage.SaveBuyableObject(this, false); }
public void SaveBooster() { SaveDataStorage.SaveBuyableObject(this); }