Re-think singleton player idea, add raycasting to stop from falling off ledges

This commit is contained in:
2022-08-15 15:40:04 -07:00
parent 4a4add3668
commit 9a245d94c7
23 changed files with 661 additions and 439 deletions

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: bcdc358652295014e9f9d90638ab5d0d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -12,14 +12,23 @@ namespace Scampz.GameJam
private TextMeshProUGUI dialogueTextGUI;
public float TextSpeed = 0.1f;
public static DialogueManager Instance { get; private set; }
public Queue<string> sentences;
private void Awake()
private static DialogueManager _instance;
public static DialogueManager Instance
{
if (Instance == null)
Instance = this;
get
{
if (!_instance)
{
_instance = new GameObject().AddComponent<DialogueManager>();
_instance.name = _instance.GetType().ToString();
DontDestroyOnLoad(_instance.gameObject);
}
return _instance;
}
}
public void Start()