// ボタン1がダブルクリックされたか private bool _isPressDbl(AVRController controller) { if (m_pressStart == 0.0f) { // ボタン1が押されたら、その時間を記憶 if (controller.VRControllerButtons.GetPressDown(m_btn1)) { m_pressStart = Time.time; } } else { // 時間内に再度ボタン1が押されているか調べる float passTime = Time.time - m_pressStart; if (passTime < DblInterval) { if (controller.VRControllerButtons.GetPressDown(m_btn1)) { m_pressStart = 0f; return(true); } } else { m_pressStart = 0f; } } return(false); }
// ボタン1が押されたか private bool _isPress1Btn(AVRController controller) { // ボタン1が押されたら if (controller.VRControllerButtons.GetPressDown(m_btn1)) { return(true); } return(false); }
public bool IsPress(AVRController controller) { if (m_isTrg != null) { if (controller != null && controller.VRControllerButtons != null) { return(m_isTrg(controller)); } } return(false); }
// ボタン1を押しながらボタン2が押されたか private bool _isPress2Btn(AVRController controller) { // ボタン1を押しながら if (controller.VRControllerButtons.GetPress(m_btn1)) { // ボタン2が押されたら if (controller.VRControllerButtons.GetPressDown(m_btn2)) { return(true); } } return(false); }