unityzgy/.svn/pristine/0d/0dfd985b92b4522aa32d072abb338a68fb89e789.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

114 lines
3.7 KiB
Plaintext

namespace VRTK.UnityEventHelper
{
using UnityEngine;
using UnityEngine.Events;
using System;
[AddComponentMenu("VRTK/Scripts/Utilities/Unity Events/VRTK_BodyPhysics_UnityEvents")]
public sealed class VRTK_BodyPhysics_UnityEvents : VRTK_UnityEvents<VRTK_BodyPhysics>
{
[Serializable]
public sealed class BodyPhysicsEvent : UnityEvent<object, BodyPhysicsEventArgs> { }
public BodyPhysicsEvent OnStartFalling = new BodyPhysicsEvent();
public BodyPhysicsEvent OnStopFalling = new BodyPhysicsEvent();
public BodyPhysicsEvent OnStartMoving = new BodyPhysicsEvent();
public BodyPhysicsEvent OnStopMoving = new BodyPhysicsEvent();
public BodyPhysicsEvent OnStartColliding = new BodyPhysicsEvent();
public BodyPhysicsEvent OnStopColliding = new BodyPhysicsEvent();
public BodyPhysicsEvent OnStartLeaning = new BodyPhysicsEvent();
public BodyPhysicsEvent OnStopLeaning = new BodyPhysicsEvent();
public BodyPhysicsEvent OnStartTouchingGround = new BodyPhysicsEvent();
public BodyPhysicsEvent OnStopTouchingGround = new BodyPhysicsEvent();
protected override void AddListeners(VRTK_BodyPhysics component)
{
component.StartFalling += StartFalling;
component.StopFalling += StopFalling;
component.StartMoving += StartMoving;
component.StopMoving += StopMoving;
component.StartColliding += StartColliding;
component.StopColliding += StopColliding;
component.StartLeaning += StartLeaning;
component.StopLeaning += StopLeaning;
component.StartTouchingGround += StartTouchingGround;
component.StopTouchingGround += StopTouchingGround;
}
protected override void RemoveListeners(VRTK_BodyPhysics component)
{
component.StartFalling -= StartFalling;
component.StopFalling -= StopFalling;
component.StartMoving -= StartMoving;
component.StopMoving -= StopMoving;
component.StartColliding -= StartColliding;
component.StopColliding -= StopColliding;
component.StartLeaning -= StartLeaning;
component.StopLeaning -= StopLeaning;
component.StartTouchingGround -= StartTouchingGround;
component.StopTouchingGround -= StopTouchingGround;
}
private void StartFalling(object o, BodyPhysicsEventArgs e)
{
OnStartFalling.Invoke(o, e);
}
private void StopFalling(object o, BodyPhysicsEventArgs e)
{
OnStopFalling.Invoke(o, e);
}
private void StartMoving(object o, BodyPhysicsEventArgs e)
{
OnStartMoving.Invoke(o, e);
}
private void StopMoving(object o, BodyPhysicsEventArgs e)
{
OnStopMoving.Invoke(o, e);
}
private void StartColliding(object o, BodyPhysicsEventArgs e)
{
OnStartColliding.Invoke(o, e);
}
private void StopColliding(object o, BodyPhysicsEventArgs e)
{
OnStopColliding.Invoke(o, e);
}
private void StartLeaning(object o, BodyPhysicsEventArgs e)
{
OnStartLeaning.Invoke(o, e);
}
private void StopLeaning(object o, BodyPhysicsEventArgs e)
{
OnStopLeaning.Invoke(o, e);
}
private void StartTouchingGround(object o, BodyPhysicsEventArgs e)
{
OnStartTouchingGround.Invoke(o, e);
}
private void StopTouchingGround(object o, BodyPhysicsEventArgs e)
{
OnStopTouchingGround.Invoke(o, e);
}
}
}