done for the night

This commit is contained in:
WillJeynes
2026-08-30 01:54:16 +01:00
parent 4eafb65db9
commit d36c0863a6
21 changed files with 5387 additions and 25570 deletions
+20 -3
View File
@@ -2,10 +2,22 @@ using System.Collections;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using UnityEngine;
using UnityEngine.UI;
using Utils;
public class EndSceneManager : MonoBehaviour
public class EndSceneManager : Singleton<EndSceneManager>
{
public TextAsset data;
public bool isPos;
public Image kingRend;
public Sprite hap;
public Sprite sad;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
@@ -14,12 +26,12 @@ public class EndSceneManager : MonoBehaviour
var text = data.ToString();
DialogManager.Instance.dialogTree = JObject.Parse(text)["dialog"] as JObject;
DialogManager.Instance.StartDialog(GetComponent<GuardManager>());
isPos = Random.Range(0f, 1f) > 0.5f;
StartCoroutine(DoSomethingAfterOneSecond());
}
IEnumerator DoSomethingAfterOneSecond()
{
@@ -28,6 +40,11 @@ public class EndSceneManager : MonoBehaviour
// Code to run after 1 second
DialogManager.Instance.gameObject.SetActive(true);
}
public void SetFace()
{
kingRend.sprite = isPos ? hap : sad;
}
// Update is called once per frame