Add music throughout. Start work on the prediction side pannels
This commit is contained in:
@@ -8,8 +8,10 @@ using Utils;
|
||||
public class StatusManager : Singleton<StatusManager>
|
||||
{
|
||||
public Transform doorPanel;
|
||||
public Transform doorPanelThoughts;
|
||||
public GameObject doorPrefab;
|
||||
public Transform guardPanel;
|
||||
public Transform guardPanelThoughts;
|
||||
public GameObject guardPrefab;
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
@@ -25,11 +27,18 @@ public class StatusManager : Singleton<StatusManager>
|
||||
|
||||
public void PopulatePanels()
|
||||
{
|
||||
PopulatePanel(doorPanel, doorPrefab, LevelLoader.Instance.Doors.Cast<IDescribable>().ToList(),LevelLoader.Instance.GlobalModifier == "HIDE");
|
||||
PopulatePanel(guardPanel, guardPrefab, LevelLoader.Instance.Guards.Cast<IDescribable>().ToList(), false);
|
||||
PopulatePanel(doorPanel, doorPrefab, LevelLoader.Instance.Doors.Cast<IDescribable>().ToList(),false, LevelLoader.Instance.GlobalModifier == "HIDE");
|
||||
PopulatePanel(guardPanel, guardPrefab, LevelLoader.Instance.Guards.Cast<IDescribable>().ToList(), false, false);
|
||||
|
||||
PopulatePanel(doorPanelThoughts, doorPrefab, LevelLoader.Instance.Doors.Cast<IDescribable>().ToList(),true, LevelLoader.Instance.GlobalModifier == "HIDE");
|
||||
PopulatePanel(guardPanelThoughts, guardPrefab, LevelLoader.Instance.Guards.Cast<IDescribable>().ToList(), true, false);
|
||||
|
||||
//hide side pannel if cup global mod, or if only one guard
|
||||
//add fallback to getdescribename
|
||||
//actually implement the setting of predictions
|
||||
}
|
||||
|
||||
private void PopulatePanel(Transform panel, GameObject template, List<IDescribable> items, bool hide)
|
||||
private void PopulatePanel(Transform panel, GameObject template, List<IDescribable> items, bool interactableType, bool hide)
|
||||
{
|
||||
foreach (Transform child in panel)
|
||||
{
|
||||
@@ -40,20 +49,28 @@ public class StatusManager : Singleton<StatusManager>
|
||||
{
|
||||
var obj = Instantiate(template, panel);
|
||||
|
||||
|
||||
var titleMesh = obj.transform.FindChildRecursive("TITLE").GetComponent<TextMeshProUGUI>();
|
||||
var descMesh = obj.transform.FindChildRecursive("DESC").GetComponent<TextMeshProUGUI>();
|
||||
|
||||
if (hide)
|
||||
if (!interactableType)
|
||||
{
|
||||
titleMesh.text = "???";
|
||||
descMesh.text = "???";
|
||||
if (hide)
|
||||
{
|
||||
titleMesh.text = "???";
|
||||
descMesh.text = "???";
|
||||
}
|
||||
else
|
||||
{
|
||||
titleMesh.text = item.GetName();
|
||||
descMesh.text = item.GetDescription();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
titleMesh.text = item.GetName();
|
||||
descMesh.text = item.GetDescription();
|
||||
titleMesh.text = item.GetDescribeName();
|
||||
descMesh.text = "Click to set prediction";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user