- LocalizationManager: 新增翻译表(SetFormatted/SetDuration/LocalizeOperateMsg) - LoginPanel: InputField placeholder本地化、字体颜色保持 - HistoryPanel: 用时数据本地化、placeholder本地化 - RecordDetailPanel: 操作详情消息本地化(LanguageChanged重建) - AppraiseWindowBase: 评价等级本地化、操作消息重建 - EditorAppraiser: 所有评估消息改用InjectOperateMsgLocalized - StudentOperateRecorder: 新增InjectOperateMsgLocalized方法 - LocalizationLanguageTestBar: 单例模式、ScreenSpaceOverlay筛选 - 字体切换时保留颜色和verticalOverflow
42 lines
1.4 KiB
C#
42 lines
1.4 KiB
C#
namespace VRTK.Examples
|
|
{
|
|
using UnityEngine;
|
|
|
|
public class Sphere_Spawner : MonoBehaviour
|
|
{
|
|
private GameObject spawnMe;
|
|
private Vector3 position;
|
|
|
|
private void Start()
|
|
{
|
|
if (GetComponent<VRTK_ControllerEvents>() == null)
|
|
{
|
|
VRTK_Logger.Error(VRTK_Logger.GetCommonMessage(VRTK_Logger.CommonMessageKeys.REQUIRED_COMPONENT_MISSING_FROM_GAMEOBJECT, "Sphere_Spawner", "VRTK_ControllerEvents", "the same"));
|
|
return;
|
|
}
|
|
|
|
GetComponent<VRTK_ControllerEvents>().TriggerPressed += new ControllerInteractionEventHandler(DoTriggerPressed);
|
|
GetComponent<VRTK_ControllerEvents>().TouchpadPressed += new ControllerInteractionEventHandler(DoTouchpadPressed);
|
|
spawnMe = GameObject.Find("SpawnMe");
|
|
position = spawnMe.transform.position;
|
|
}
|
|
|
|
private void DoTriggerPressed(object sender, ControllerInteractionEventArgs e)
|
|
{
|
|
Invoke("CreateSphere", 0f);
|
|
}
|
|
|
|
private void DoTouchpadPressed(object sender, ControllerInteractionEventArgs e)
|
|
{
|
|
for (int i = 0; i < 20; i++)
|
|
{
|
|
Invoke("CreateSphere", 0f);
|
|
}
|
|
}
|
|
|
|
private void CreateSphere()
|
|
{
|
|
Instantiate(spawnMe, position, Quaternion.identity);
|
|
}
|
|
}
|
|
} |