Re-think singleton player idea, add raycasting to stop from falling off ledges
This commit is contained in:
@@ -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