-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFonLoadScript.cs
More file actions
32 lines (30 loc) · 852 Bytes
/
Copy pathFonLoadScript.cs
File metadata and controls
32 lines (30 loc) · 852 Bytes
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
using UnityEngine;
public class FonLoadScript : MonoBehaviour
{
public float timeRemaining = 2f;
private void OnEnable()
{
var AM = AppManager.Instance;
timeRemaining = 2f;
AM.BottomBar.SetActive(false);
}
void Update()
{
var AM = AppManager.Instance;
var info = AppManager.Instance.userInfo;
if (timeRemaining > 0)
{
timeRemaining -= Time.deltaTime;
if (timeRemaining < 0 && info.access_token != "")
{
AM.fonLoad.SetActive(false);
AM.BottomBar.SetActive(true);
}
if (timeRemaining < 0 && AM.noLogin == 1)
{
AM.fonLoad.SetActive(false);
AM.BottomBar.SetActive(true);
}
}
}
}