public override bool TrySpendResources(int resourcesCount) { if (Count < resourcesCount) { return(false); } Count -= resourcesCount; OnChangedResourcesCount?.Invoke(Count); SaveResource(); StartResourceRecovery(); return(true); }
protected override void LoadResource() { Count = PlayerPrefs.GetInt("Energy"); OnChangedResourcesCount?.Invoke(Count); }