- LocalizationManager: 新增翻译表(SetFormatted/SetDuration/LocalizeOperateMsg) - LoginPanel: InputField placeholder本地化、字体颜色保持 - HistoryPanel: 用时数据本地化、placeholder本地化 - RecordDetailPanel: 操作详情消息本地化(LanguageChanged重建) - AppraiseWindowBase: 评价等级本地化、操作消息重建 - EditorAppraiser: 所有评估消息改用InjectOperateMsgLocalized - StudentOperateRecorder: 新增InjectOperateMsgLocalized方法 - LocalizationLanguageTestBar: 单例模式、ScreenSpaceOverlay筛选 - 字体切换时保留颜色和verticalOverflow
71 lines
1.7 KiB
Plaintext
71 lines
1.7 KiB
Plaintext
using UnityEngine;
|
|
using System.Collections;
|
|
#if ENVIRO_UBER_SUPPORT
|
|
[AddComponentMenu("Enviro/Integration/UBER")]
|
|
#endif
|
|
public class EnviroUBERIntegration : MonoBehaviour
|
|
{
|
|
#if ENVIRO_UBER_SUPPORT
|
|
public UBER_GlobalParams UBER_Global_Parameters;
|
|
|
|
private float curWetness = 0f;
|
|
private float curSnow = 0f;
|
|
|
|
public void Start()
|
|
{
|
|
if (UBER_Global_Parameters != null)
|
|
{
|
|
UBER_Global_Parameters.Simulate = true;
|
|
UBER_Global_Parameters.UseParticleSystem = false;
|
|
}
|
|
else
|
|
{
|
|
UBER_Global_Parameters = FindObjectOfType<UBER_GlobalParams>();
|
|
|
|
if (UBER_Global_Parameters != null)
|
|
{
|
|
UBER_Global_Parameters.Simulate = true;
|
|
UBER_Global_Parameters.UseParticleSystem = false;
|
|
}
|
|
else
|
|
{
|
|
Debug.LogError("Please setup dynamic weather for UBER!");
|
|
this.enabled = false;
|
|
}
|
|
}
|
|
}
|
|
|
|
void GetParameters ()
|
|
{
|
|
curWetness = EnviroSkyMgr.instance.GetWetnessIntensity();
|
|
curSnow = EnviroSkyMgr.instance.GetSnowIntensity();
|
|
}
|
|
|
|
public void Update()
|
|
{
|
|
if (EnviroSkyMgr.instance == null)
|
|
return;
|
|
|
|
GetParameters ();
|
|
|
|
if (curWetness >= curSnow)
|
|
{
|
|
if(curWetness > 0.05f)
|
|
UBER_Global_Parameters.fallIntensity = curWetness;
|
|
else
|
|
UBER_Global_Parameters.fallIntensity = 0f;
|
|
}
|
|
else
|
|
{
|
|
if(curSnow > 0.05f)
|
|
UBER_Global_Parameters.fallIntensity = curSnow;
|
|
else
|
|
UBER_Global_Parameters.fallIntensity = 0f;
|
|
}
|
|
|
|
UBER_Global_Parameters.temperature = EnviroSkyMgr.instance.Weather.currentTemperature;
|
|
}
|
|
#endif
|
|
}
|
|
|