Add player sprite and simple animation system

This commit is contained in:
WillJeynes
2026-08-25 13:20:59 +01:00
parent 48089856c7
commit 514ba1f26f
23 changed files with 1826 additions and 10 deletions
+8
View File
@@ -19,6 +19,9 @@ public class SpeechManager : Singleton<SpeechManager>
[CanBeNull] private string fulltext;
private Coroutine ccoroutine;
public string Status = "TALKING";
void Start()
{
@@ -50,6 +53,7 @@ public class SpeechManager : Singleton<SpeechManager>
public void StartText(KeyValuePair<string,string>[] buffer)
{
Status = "TALKING";
gameObject.SetActive(true);
foreach (var kvp in buffer)
{
@@ -109,6 +113,10 @@ public class SpeechManager : Singleton<SpeechManager>
}
}
Status = fulltext.Length > 30 ? "DONELONG" : "DONE";
fulltext = null;
}
}
+21
View File
@@ -0,0 +1,21 @@
using UnityEngine;
public class SpeechVisualController : MonoBehaviour
{
private int status = 0;
private Animator animator;
void Start()
{
animator = GetComponent<Animator>();
}
void Update()
{
if (SpeechManager.Instance.Status != "TALKING")
{
animator.SetInteger("SetTalkEnd", SpeechManager.Instance.Status == "DONELONG"?1:2);
}
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 971accf797eb4079d985759eb11177e0