mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-12 22:44:35 +01:00
26 lines
600 B
C#
26 lines
600 B
C#
using UnityEngine;
|
|
|
|
namespace MoleMole
|
|
{
|
|
public class MonoWeatherTest : MonoBehaviour
|
|
{
|
|
private void OnGUI()
|
|
{
|
|
if (GUILayout.Button("Query Weather"))
|
|
{
|
|
}
|
|
WeatherInfo weatherInfo = Singleton<RealTimeWeatherManager>.Instance.GetWeatherInfo();
|
|
if (weatherInfo != null)
|
|
{
|
|
GUILayout.Label("WeatherType:" + weatherInfo.weatherType);
|
|
GUILayout.Label("Temperature:" + weatherInfo.temperature);
|
|
GUILayout.Label(("ExtraInfo:" + weatherInfo.extraInfo == null) ? string.Empty : weatherInfo.extraInfo);
|
|
}
|
|
else
|
|
{
|
|
GUILayout.Label("<No Weather Info>");
|
|
}
|
|
}
|
|
}
|
|
}
|