Add initial game systems and input handling for player interactions
This commit is contained in:
18
Assets/Scripts/Infrastructure/PlayerPrefsPersistence.cs
Normal file
18
Assets/Scripts/Infrastructure/PlayerPrefsPersistence.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Infrastructure
|
||||
{
|
||||
public class PlayerPrefsPersistence : IPersistenceService
|
||||
{
|
||||
public void SaveHighScore(string key, int score)
|
||||
{
|
||||
PlayerPrefs.SetInt(key, score);
|
||||
PlayerPrefs.Save();
|
||||
}
|
||||
|
||||
public int LoadHighScore(string key)
|
||||
{
|
||||
return PlayerPrefs.GetInt(key, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user