You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
846 B
34 lines
846 B
using UnityEngine; |
|
using System.Collections; |
|
using UnityEngine.SceneManagement; |
|
|
|
namespace Fungus |
|
{ |
|
public class SaveHelper : MonoBehaviour |
|
{ |
|
[SerializeField] protected string startScene = ""; |
|
|
|
public virtual void Load(int slot) |
|
{ |
|
var saveManager = FungusManager.Instance.SaveManager; |
|
saveManager.Load(slot, startScene); |
|
} |
|
|
|
public virtual void Save() |
|
{ |
|
var saveManager = FungusManager.Instance.SaveManager; |
|
saveManager.Save(); |
|
} |
|
|
|
public virtual void Delete(int slot) |
|
{ |
|
var saveManager = FungusManager.Instance.SaveManager; |
|
saveManager.Delete(slot); |
|
} |
|
|
|
public virtual void LoadScene(string sceneName) |
|
{ |
|
SceneManager.LoadScene(sceneName); |
|
} |
|
} |
|
} |