2022-06-02 14:25:22 +02:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
using UnityEngine.SceneManagement;
|
|
|
|
|
|
|
|
public class SaveController : MonoBehaviour
|
|
|
|
{
|
|
|
|
public void SaveScene()
|
|
|
|
{
|
|
|
|
string activeScene = SceneManager.GetActiveScene().name;
|
|
|
|
PlayerPrefs.SetString("SceneSaved", activeScene);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void LoadScene()
|
|
|
|
{
|
|
|
|
string sceneToGoTo = PlayerPrefs.GetString("SceneSaved");
|
|
|
|
SceneManager.LoadScene(sceneToGoTo);
|
2022-06-15 19:54:44 +02:00
|
|
|
int continued = 1;
|
|
|
|
PlayerPrefs.SetInt("continued", continued);
|
2022-06-02 14:25:22 +02:00
|
|
|
}
|
2022-06-17 22:22:19 +02:00
|
|
|
|
2022-11-24 03:03:30 +01:00
|
|
|
public void SaveItems() // toDO change name to save Equipment - save items will save items on map eg after drops
|
2022-06-17 22:22:19 +02:00
|
|
|
{
|
2022-11-24 03:03:30 +01:00
|
|
|
//SceneEquippableItemManager.Instance.SaveEquippableItems();
|
|
|
|
EquipmentDataManager.Instance.SaveDynamicData();
|
2022-06-17 22:22:19 +02:00
|
|
|
}
|
2022-06-19 02:56:04 +02:00
|
|
|
|
|
|
|
public void SaveQuests()
|
|
|
|
{
|
2022-10-22 18:04:21 +02:00
|
|
|
SceneTaskDataManager.Instance.SaveStaticData();
|
|
|
|
|
|
|
|
// right now, we dont need to save dynamic list :D
|
2022-06-19 02:56:04 +02:00
|
|
|
}
|
2022-06-19 14:38:22 +02:00
|
|
|
|
|
|
|
public void SaveInventory()
|
|
|
|
{
|
2022-11-06 21:34:17 +01:00
|
|
|
SceneInventoryDataManager.Instance.SaveStaticData();
|
2022-06-19 14:38:22 +02:00
|
|
|
}
|
2022-06-20 01:04:56 +02:00
|
|
|
|
|
|
|
public void SaveChests()
|
|
|
|
{
|
2022-11-24 03:03:30 +01:00
|
|
|
SceneChestDataManager.Instance.SaveDynamicData();
|
2022-06-20 01:04:56 +02:00
|
|
|
}
|
2022-06-02 14:25:22 +02:00
|
|
|
}
|