unityzgy/.svn/pristine/da/da4185d64ab30a1c32527e581d8608f58463e7ad.svn-base
ayuan9957 bf12e02276 feat: 多语言本地化系统 - 支持中/英/法/俄实时切换
- LocalizationManager: 新增翻译表(SetFormatted/SetDuration/LocalizeOperateMsg)
- LoginPanel: InputField placeholder本地化、字体颜色保持
- HistoryPanel: 用时数据本地化、placeholder本地化
- RecordDetailPanel: 操作详情消息本地化(LanguageChanged重建)
- AppraiseWindowBase: 评价等级本地化、操作消息重建
- EditorAppraiser: 所有评估消息改用InjectOperateMsgLocalized
- StudentOperateRecorder: 新增InjectOperateMsgLocalized方法
- LocalizationLanguageTestBar: 单例模式、ScreenSpaceOverlay筛选
- 字体切换时保留颜色和verticalOverflow
2026-07-16 10:05:59 +08:00

74 lines
2.0 KiB
Plaintext

using System.Collections;
using UnityEngine;
#if ENVIRO_PEGASUS_SUPPORT
namespace Pegasus
{
/// <summary>
/// Control the weather in Enviro from Pegasus
/// </summary>
public class TriggerControlEnviro : TriggerBase
{
public EnviroSkyMgr m_enviroSky;
public bool m_controlTime = false;
public float m_startTime = 0f;
public float m_endTime = 23.999f;
public bool m_controlWeather = false;
public int m_weatherID = 0;
public float m_weatherTransitionTime = 10f; //Seconds
/// <summary>
/// Called when the trigger starts
/// </summary>
/// <param name="poi"></param>
public override void OnStart(PegasusPoi poi)
{
if (poi == null)
{
Debug.LogWarning(string.Format("Poi was not supplied on {0} - exiting", name));
return;
}
if (m_enviroSky == null)
{
m_enviroSky = GameObject.FindObjectOfType<EnviroSkyMgr>();
}
if (m_enviroSky == null)
{
Debug.LogWarning(string.Format("EnviroSky Manager was not located on {0} - exiting", name));
return;
}
if (m_controlTime)
{
m_enviroSky.SetTimeOfDay(m_startTime);
}
if (m_controlWeather)
{
m_enviroSky.WeatherSettings.effectTransitionSpeed = m_weatherTransitionTime;
m_enviroSky.ChangeWeather(m_weatherID);
}
}
/// <summary>
/// Called when the trigger is updated
/// </summary>
/// <param name="poi"></param>
public override void OnUpdate(PegasusPoi poi, float progress)
{
if (m_enviroSky == null)
{
return;
}
if (m_controlTime)
{
m_enviroSky.SetTimeOfDay(m_startTime + ((m_endTime - m_startTime) * progress));
}
}
}
}
#endif