unityzgy/.svn/pristine/cb/cbd2e6764bf046ec79f1b89a4952edb8ce06ac8f.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
3.4 KiB
Plaintext

namespace VRTK.UnityEventHelper
{
using UnityEngine;
using UnityEngine.Events;
using System;
[AddComponentMenu("VRTK/Scripts/Utilities/Unity Events/VRTK_InteractTouch_UnityEvents")]
public sealed class VRTK_InteractTouch_UnityEvents : VRTK_UnityEvents<VRTK_InteractTouch>
{
[Serializable]
public sealed class ObjectInteractEvent : UnityEvent<object, ObjectInteractEventArgs> { }
public ObjectInteractEvent OnControllerStartTouchInteractableObject = new ObjectInteractEvent();
public ObjectInteractEvent OnControllerTouchInteractableObject = new ObjectInteractEvent();
public ObjectInteractEvent OnControllerStartUntouchInteractableObject = new ObjectInteractEvent();
public ObjectInteractEvent OnControllerUntouchInteractableObject = new ObjectInteractEvent();
public ObjectInteractEvent OnControllerRigidbodyActivated = new ObjectInteractEvent();
public ObjectInteractEvent OnControllerRigidbodyDeactivated = new ObjectInteractEvent();
protected override void AddListeners(VRTK_InteractTouch component)
{
component.ControllerStartTouchInteractableObject += ControllerStartTouchInteractableObject;
component.ControllerTouchInteractableObject += ControllerTouchInteractableObject;
component.ControllerStartUntouchInteractableObject += ControllerStartUntouchInteractableObject;
component.ControllerUntouchInteractableObject += ControllerUntouchInteractableObject;
component.ControllerRigidbodyActivated += ControllerRigidbodyActivated;
component.ControllerRigidbodyDeactivated += ControllerRigidbodyDeactivated;
}
protected override void RemoveListeners(VRTK_InteractTouch component)
{
component.ControllerStartTouchInteractableObject -= ControllerStartTouchInteractableObject;
component.ControllerTouchInteractableObject -= ControllerTouchInteractableObject;
component.ControllerStartUntouchInteractableObject -= ControllerStartUntouchInteractableObject;
component.ControllerUntouchInteractableObject -= ControllerUntouchInteractableObject;
component.ControllerRigidbodyActivated -= ControllerRigidbodyActivated;
component.ControllerRigidbodyDeactivated -= ControllerRigidbodyDeactivated;
}
private void ControllerStartTouchInteractableObject(object o, ObjectInteractEventArgs e)
{
OnControllerStartTouchInteractableObject.Invoke(o, e);
}
private void ControllerTouchInteractableObject(object o, ObjectInteractEventArgs e)
{
OnControllerTouchInteractableObject.Invoke(o, e);
}
private void ControllerStartUntouchInteractableObject(object o, ObjectInteractEventArgs e)
{
OnControllerStartUntouchInteractableObject.Invoke(o, e);
}
private void ControllerUntouchInteractableObject(object o, ObjectInteractEventArgs e)
{
OnControllerUntouchInteractableObject.Invoke(o, e);
}
private void ControllerRigidbodyActivated(object o, ObjectInteractEventArgs e)
{
OnControllerRigidbodyActivated.Invoke(o, e);
}
private void ControllerRigidbodyDeactivated(object o, ObjectInteractEventArgs e)
{
OnControllerRigidbodyDeactivated.Invoke(o, e);
}
}
}