Add initial project files and configurations for Unity setup
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using Core.Ports;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Infrastructure.Unity
|
||||
{
|
||||
public class PlayerPrefsPersistenceAdapter : IPersistenceService
|
||||
{
|
||||
public void Save(string key, int value)
|
||||
{
|
||||
PlayerPrefs.SetInt(key, value);
|
||||
PlayerPrefs.Save();
|
||||
}
|
||||
|
||||
public int Load(string key, int defaultValue = 0)
|
||||
{
|
||||
return PlayerPrefs.GetInt(key, defaultValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user