Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
UIGameBG.cs
Go to the documentation of this file.
1using UnityEngine;
2using UnityEngine.UI;
3
4public class UIGameBG : EMono
5{
6 public static UIGameBG Instance;
7
8 public bool indoor;
9
10 private Image image;
11
12 public static bool IsActive
13 {
14 get
15 {
16 if ((bool)Instance)
17 {
18 return Instance.image.color.a >= 1f;
19 }
20 return false;
21 }
22 }
23
24 private void Awake()
25 {
26 image = GetComponent<Image>();
27 InvokeRepeating("Refresh", 0.5f, 0.5f);
28 Refresh();
29 Instance = this;
30 }
31
32 public void Refresh()
33 {
34 float timeRatio = EMono.scene.timeRatio;
36 color.sun.Evaluate(timeRatio);
37 Color color2 = color.sky.Evaluate(timeRatio);
38 color.skyBG.Evaluate(timeRatio);
39 if (timeRatio < 0.3f)
40 {
41 Mathf.Min((0.3f - timeRatio) * 10f, 1f);
42 }
43 if (!indoor)
44 {
45 image.color = color2;
46 }
47 }
48}
Definition: EMono.cs:4
static Scene scene
Definition: EMono.cs:27
SceneColorProfile color
Definition: SceneProfile.cs:12
float timeRatio
Definition: Scene.cs:124
SceneProfile profile
Definition: Scene.cs:73
void Awake()
Definition: UIGameBG.cs:24
static UIGameBG Instance
Definition: UIGameBG.cs:6
static bool IsActive
Definition: UIGameBG.cs:13
void Refresh()
Definition: UIGameBG.cs:32
bool indoor
Definition: UIGameBG.cs:8
Image image
Definition: UIGameBG.cs:10