- LocalizationManager: 新增翻译表(SetFormatted/SetDuration/LocalizeOperateMsg) - LoginPanel: InputField placeholder本地化、字体颜色保持 - HistoryPanel: 用时数据本地化、placeholder本地化 - RecordDetailPanel: 操作详情消息本地化(LanguageChanged重建) - AppraiseWindowBase: 评价等级本地化、操作消息重建 - EditorAppraiser: 所有评估消息改用InjectOperateMsgLocalized - StudentOperateRecorder: 新增InjectOperateMsgLocalized方法 - LocalizationLanguageTestBar: 单例模式、ScreenSpaceOverlay筛选 - 字体切换时保留颜色和verticalOverflow
88 lines
1.7 KiB
Plaintext
88 lines
1.7 KiB
Plaintext
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class EnviroTrigger : MonoBehaviour {
|
|
|
|
public EnviroInterior myZone;
|
|
public string Name;
|
|
|
|
//public bool entered = false;
|
|
|
|
void Start ()
|
|
{
|
|
|
|
}
|
|
|
|
|
|
void Update ()
|
|
{
|
|
|
|
}
|
|
void OnTriggerEnter (Collider col)
|
|
{
|
|
if (EnviroSkyMgr.instance.GetUseWeatherTag())
|
|
{
|
|
if (col.gameObject.tag == EnviroSkyMgr.instance.GetEnviroSkyTag()) {
|
|
EnterExit ();
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (EnviroSkyMgr.instance.IsEnviroSkyAttached(col.gameObject)) {
|
|
EnterExit ();
|
|
}
|
|
}
|
|
}
|
|
|
|
void OnTriggerExit (Collider col)
|
|
{
|
|
|
|
if (myZone.zoneTriggerType == EnviroInterior.ZoneTriggerType.Zone)
|
|
{
|
|
if (EnviroSkyMgr.instance.GetUseWeatherTag())
|
|
{
|
|
if (col.gameObject.tag == EnviroSkyMgr.instance.GetEnviroSkyTag())
|
|
{
|
|
EnterExit();
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (EnviroSkyMgr.instance.IsEnviroSkyAttached(col.gameObject))
|
|
{
|
|
EnterExit();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
void EnterExit ()
|
|
{
|
|
if (EnviroSkyMgr.instance.lastInteriorZone != myZone)
|
|
{
|
|
if (EnviroSkyMgr.instance.lastInteriorZone != null)
|
|
EnviroSkyMgr.instance.lastInteriorZone.StopAllFading();
|
|
|
|
myZone.Enter();
|
|
}
|
|
else
|
|
{
|
|
if (!EnviroSkyMgr.instance.IsInterior())
|
|
myZone.Enter();
|
|
else
|
|
myZone.Exit();
|
|
}
|
|
}
|
|
|
|
void OnDrawGizmos ()
|
|
{
|
|
Gizmos.matrix = transform.localToWorldMatrix;
|
|
Gizmos.color = new Color(0.2f,0.2f,1f,0.5f);
|
|
Gizmos.DrawCube (Vector3.zero,Vector3.one);
|
|
}
|
|
}
|