Implement final scene

This commit is contained in:
WillJeynes
2026-08-29 20:44:27 +01:00
parent fec7b392b5
commit 0c897631bc
18 changed files with 6049 additions and 4748 deletions
+38
View File
@@ -0,0 +1,38 @@
using System.Collections;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using UnityEngine;
public class EndSceneManager : MonoBehaviour
{
public TextAsset data;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
LevelLoader.Instance.Guards = new List<GuardManager>();
LevelLoader.Instance.Doors = new List<DoorManager>();
var text = data.ToString();
DialogManager.Instance.dialogTree = JObject.Parse(text)["dialog"] as JObject;
DialogManager.Instance.StartDialog(GetComponent<GuardManager>());
StartCoroutine(DoSomethingAfterOneSecond());
}
IEnumerator DoSomethingAfterOneSecond()
{
yield return new WaitForSeconds(1f);
// Code to run after 1 second
DialogManager.Instance.gameObject.SetActive(true);
}
// Update is called once per frame
void Update()
{
}
}