update to unity 6.2, add save system and quest system

This commit is contained in:
2025-12-02 16:52:02 -06:00
parent aea12ab091
commit c7dca2f8e5
23 changed files with 767 additions and 48 deletions
+30
View File
@@ -1,9 +1,11 @@
using System.Collections.Generic;
using UnityEngine;
public class GameManager : MonoBehaviour
{
public static GameManager Instance { get; private set; }
public DialogueManager DialogueManager { get; private set; }
public Storybools Storybools { get; private set; }
private void Awake()
{
@@ -19,6 +21,34 @@ private void Awake()
DontDestroyOnLoad(gameObject);
DialogueManager = GetComponent<DialogueManager>();
SaveSystem.Load();
}
}
#region Storybool Save/Load
public void SaveStoryBools(ref StoryboolSaveData data)
{
data.Storybools = Instance.Storybools;
}
public void LoadStoryBools(StoryboolSaveData data)
{
if (data.Storybools != null)
{
Instance.Storybools = data.Storybools;
}
else
{
Instance.Storybools = new Storybools();
}
}
#endregion
public int StarShards = 0; // will replace with inventory system
}
[System.Serializable]
public struct StoryboolSaveData
{
public Storybools Storybools;
}