Re-think singleton player idea, add raycasting to stop from falling off ledges
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bcdc358652295014e9f9d90638ab5d0d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user