- LocalizationManager: 新增翻译表(SetFormatted/SetDuration/LocalizeOperateMsg) - LoginPanel: InputField placeholder本地化、字体颜色保持 - HistoryPanel: 用时数据本地化、placeholder本地化 - RecordDetailPanel: 操作详情消息本地化(LanguageChanged重建) - AppraiseWindowBase: 评价等级本地化、操作消息重建 - EditorAppraiser: 所有评估消息改用InjectOperateMsgLocalized - StudentOperateRecorder: 新增InjectOperateMsgLocalized方法 - LocalizationLanguageTestBar: 单例模式、ScreenSpaceOverlay筛选 - 字体切换时保留颜色和verticalOverflow
86 lines
2.1 KiB
Plaintext
86 lines
2.1 KiB
Plaintext
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
////// EnviroMeshSeasons - Switches Materials on MeshRenderer for seasons ///////
|
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
using UnityEngine;
|
|
using System.Collections;
|
|
|
|
[AddComponentMenu("Enviro/Utility/Seasons for GameObjects")]
|
|
public class EnviroSeasonObjectSwitcher : MonoBehaviour {
|
|
|
|
public GameObject SpringObject;
|
|
public GameObject SummerObject;
|
|
public GameObject AutumnObject;
|
|
public GameObject WinterObject;
|
|
|
|
void Start ()
|
|
{
|
|
SwitchSeasonObject ();
|
|
|
|
EnviroSkyMgr.instance.OnSeasonChanged += (EnviroSeasons.Seasons season) =>
|
|
{
|
|
SwitchSeasonObject ();
|
|
};
|
|
}
|
|
|
|
// Check for correct Setup
|
|
void OnEnable ()
|
|
{
|
|
|
|
if(SpringObject == null)
|
|
{
|
|
Debug.LogError("Please assign a spring Object in Inspector!");
|
|
this.enabled = false;
|
|
}
|
|
if(SummerObject == null)
|
|
{
|
|
Debug.LogError("Please assign a summer Object in Inspector!");
|
|
this.enabled = false;
|
|
}
|
|
if(AutumnObject == null)
|
|
{
|
|
Debug.LogError("Please assign a autumn Object in Inspector!");
|
|
this.enabled = false;
|
|
}
|
|
if(WinterObject == null)
|
|
{
|
|
Debug.LogError("Please assign a winter Object in Inspector!");
|
|
this.enabled = false;
|
|
}
|
|
}
|
|
|
|
void SwitchSeasonObject ()
|
|
{
|
|
switch (EnviroSkyMgr.instance.GetCurrentSeason())
|
|
{
|
|
case EnviroSeasons.Seasons.Spring:
|
|
SummerObject.SetActive(false);
|
|
AutumnObject.SetActive(false);
|
|
WinterObject.SetActive(false);
|
|
SpringObject.SetActive(true);
|
|
break;
|
|
|
|
case EnviroSeasons.Seasons.Summer:
|
|
SpringObject.SetActive(false);
|
|
AutumnObject.SetActive(false);
|
|
WinterObject.SetActive(false);
|
|
SummerObject.SetActive(true);
|
|
break;
|
|
|
|
case EnviroSeasons.Seasons.Autumn:
|
|
SpringObject.SetActive(false);
|
|
SummerObject.SetActive(false);
|
|
WinterObject.SetActive(false);
|
|
AutumnObject.SetActive(true);
|
|
break;
|
|
|
|
case EnviroSeasons.Seasons.Winter:
|
|
SpringObject.SetActive(false);
|
|
SummerObject.SetActive(false);
|
|
AutumnObject.SetActive(false);
|
|
WinterObject.SetActive(true);
|
|
break;
|
|
}
|
|
}
|
|
}
|