mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-15 16:04:44 +01:00
16 lines
513 B
C#
16 lines
513 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace MoleMole
|
|
{
|
|
public class MonoBGWeather : MonoBehaviour
|
|
{
|
|
private void Start()
|
|
{
|
|
int hour = TimeUtil.Now.Hour;
|
|
string prefabPath = ((!(TimeUtil.Now < Singleton<MiHoYoGameData>.Instance.LocalData.EndThunderDateTime)) ? MiscData.Config.WeatherBgPath[hour] : ((hour < 6 || hour > 21) ? MiscData.Config.WeatherBgPath[25] : MiscData.Config.WeatherBgPath[24]));
|
|
base.transform.GetComponent<Image>().sprite = Miscs.GetSpriteByPrefab(prefabPath);
|
|
}
|
|
}
|
|
}
|