- LocalizationManager: 新增翻译表(SetFormatted/SetDuration/LocalizeOperateMsg) - LoginPanel: InputField placeholder本地化、字体颜色保持 - HistoryPanel: 用时数据本地化、placeholder本地化 - RecordDetailPanel: 操作详情消息本地化(LanguageChanged重建) - AppraiseWindowBase: 评价等级本地化、操作消息重建 - EditorAppraiser: 所有评估消息改用InjectOperateMsgLocalized - StudentOperateRecorder: 新增InjectOperateMsgLocalized方法 - LocalizationLanguageTestBar: 单例模式、ScreenSpaceOverlay筛选 - 字体切换时保留颜色和verticalOverflow
71 lines
2.0 KiB
C#
71 lines
2.0 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using VRTK;
|
|
|
|
public class VRInputTest : MonoBehaviour
|
|
{
|
|
|
|
Transform currentTrans;
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
GetComponent<VRTK_ControllerEvents>().TouchpadAxisChanged += new ControllerInteractionEventHandler(DoTouchpadPressed);
|
|
GetComponent<VRTK_ControllerEvents>().TouchpadTouchEnd += new ControllerInteractionEventHandler(DoTouchpadReleased);
|
|
GetComponent<VRTK_ControllerEvents>().TriggerClicked += TriggerClicked;
|
|
GetComponent<VRTK_ControllerEvents>().ButtonTwoPressed += LittleButtonClick;
|
|
GetComponent<VRTK_Pointer>().DestinationMarkerHover += DestinationMarkerHover;
|
|
GetComponent<VRTK_Pointer>().PointerStateInvalid += PointerInValid;
|
|
GetComponent<VRTK_Pointer>().PointerStateValid += PointerValid;
|
|
}
|
|
|
|
|
|
private void LittleButtonClick(object sender, ControllerInteractionEventArgs e)
|
|
{
|
|
Debug.Log("小按钮按下");
|
|
}
|
|
|
|
//
|
|
private void PointerValid(object sender, DestinationMarkerEventArgs e)
|
|
{
|
|
Debug.Log(e.target.name);
|
|
}
|
|
|
|
//
|
|
private void PointerInValid(object sender, DestinationMarkerEventArgs e)
|
|
{
|
|
Debug.Log("无碰撞物体");
|
|
}
|
|
|
|
//
|
|
private void DestinationMarkerHover(object sender, DestinationMarkerEventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
//
|
|
private void TriggerClicked(object sender, ControllerInteractionEventArgs e)
|
|
{
|
|
Debug.Log( GetComponent<VRTK_Pointer>().IsPointerActive());//判断射线是否存在
|
|
}
|
|
|
|
//
|
|
private void DoTouchpadPressed(object sender, ControllerInteractionEventArgs e)
|
|
{
|
|
//throw new NotImplementedException();
|
|
}
|
|
|
|
//
|
|
private void DoTouchpadReleased(object sender, ControllerInteractionEventArgs e)
|
|
{
|
|
//throw new NotImplementedException();
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|