Hi!
I’m getting a double save message after I press S
any idea why is this happening?
And here is the code for the SavingWrapper:
using RPG.Saving;
using UnityEngine;
namespace RPG.SceneManagement
{
public class SavingWrapper : MonoBehaviour
{
const string defaultSaveFile = "save";
private void Update()
{
if (Input.GetKeyDown(KeyCode.L))
{
Load();
}
if (Input.GetKeyDown(KeyCode.S))
{
Save();
}
}
private void Load()
{
//call to the saving system load
GetComponent<SavingSystem>().Load(defaultSaveFile);
}
private void Save()
{
GetComponent<SavingSystem>().Save(defaultSaveFile);
}
}
}
thanks!