unityzgy/.svn/pristine/69/6902a4782201f14a4e9ac9955edb944009be22a7.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

70 lines
2.2 KiB
Plaintext

// Vegetation Studio Pro Integration v0.2
// Thanks to Meishin for optimizations!
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
#if VEGETATION_STUDIO_PRO
using AwesomeTechnologies.VegetationSystem;
using AwesomeTechnologies.VegetationStudio;
#endif
[AddComponentMenu("Enviro/Integration/VS Pro Integration")]
public class EnviroVegetationStudioPro : MonoBehaviour
{
#if VEGETATION_STUDIO_PRO
private const float updatePrecision = 0.01f;
public bool setWindZone = true;
public bool syncRain = true;
public bool syncSnow = true;
void Start()
{
if (VegetationStudioManager.Instance == null || EnviroSkyMgr.instance == null)
return;
if (setWindZone)
{
for (int i = 0; i < VegetationStudioManager.Instance.VegetationSystemList.Count; i++)
{
VegetationStudioManager.Instance.VegetationSystemList[i].SelectedWindZone = EnviroSkyMgr.instance.Components.windZone;
}
}
}
void Update()
{
if(VegetationStudioManager.Instance == null || EnviroSkyMgr.instance == null)
return;
//Update Vegetation Systems
foreach(VegetationSystemPro vegetationSystem in VegetationStudioManager.Instance.VegetationSystemList)
{
if (!vegetationSystem.enabled)
continue;
EnviroWeather Enviro = EnviroSkyMgr.instance.Weather;
EnvironmentSettings VSPro = vegetationSystem.EnvironmentSettings;
// Should we refresh VSPro ?
bool updateVSPro = false;
if (syncRain && Mathf.Abs(VSPro.RainAmount - Enviro.wetness) >= updatePrecision)
updateVSPro = true;
if (syncSnow && Mathf.Abs(VSPro.SnowAmount - Enviro.snowStrength) >= updatePrecision)
updateVSPro = true;
if (syncRain && updateVSPro)
VSPro.RainAmount = Enviro.wetness;
if (syncSnow && updateVSPro)
VSPro.SnowAmount = Enviro.snowStrength;
if (updateVSPro)
vegetationSystem.RefreshMaterials();
}
}
#endif
}