blob: e0a7b5cada2892c3a42e8b1832fdef71aae71f3e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
using TMPro;
using UnityEngine;
public class TreasureChestUIHelper : MonoBehaviour
{
public Transform scaleTarget;
public TextMeshProUGUI balanceNumber;
public GameObject toggleParent;
private DayNightCycle dnc;
private LocalGamestate lgs;
private void Update()
{
if (dnc == null)
{
dnc = DayNightCycle.Instance;
}
if (lgs == null)
{
lgs = LocalGamestate.Instance;
}
if (dnc == null || lgs == null)
{
toggleParent.SetActive(value: false);
}
else if (dnc.CurrentTimestate == DayNightCycle.Timestate.Day && lgs.CurrentState == LocalGamestate.State.InMatch)
{
toggleParent.SetActive(value: true);
}
else
{
toggleParent.SetActive(value: false);
}
}
}
|