private void UF_UpdateUnLockDebugger() { if (IsActive) { return; } if (DeviceInput.UF_Down(0)) { if (mPassIdx >= UnlockPassSqueue.Length) { IsActive = true; mPassIdx = 0; return; } else { int side = UF_ClickSideType(DeviceInput.UF_DownPosition(0)); if (side == UnlockPassSqueue[mPassIdx]) { mPassIdx++; } else { mPassIdx = 0; } } } }
// Update is called once per frame public void UF_OnUpdate() { if (!IsActive) { return; } if (m_IsPress && UsePress) { m_CurrentPressTime += GTime.RunDeltaTime; if (m_CurrentPressTime >= PressInterval) { m_CurrentPressTime = 0; RaycastHit hit; Camera camera = Camera.main; if (camera != null && !IsUIRayCast() && Physics.Raycast(camera.ScreenPointToRay(DeviceInput.UF_PressPosition(0)), out hit, Distance)) { MessageSystem.UF_GetInstance().UF_Send(DefineEvent.E_LUA, DefineLuaEvent.E_RAYCAST_HIT, hit); } } if (!DeviceInput.UF_Press(0)) { m_CurrentPressTime = 0; } } else { if (DeviceInput.UF_Down(0)) { RaycastHit hit; Camera camera = Camera.main; if (camera != null && !IsUIRayCast() && Physics.Raycast(camera.ScreenPointToRay(DeviceInput.UF_PressPosition(0)), out hit, Distance)) { if (UsePress) { m_IsPress = true; m_CurrentPressTime = 0; } MessageSystem.UF_GetInstance().UF_Send(DefineEvent.E_LUA, DefineLuaEvent.E_RAYCAST_HIT, hit); } } } if (!DeviceInput.UF_Press()) { m_IsPress = false; } }
public void OnPointerDown(PointerEventData eventData) { if (!this.enabled) { return; } if (DeviceInput.UF_Down(0)) { m_SourceLPosition = this.transform.localPosition; m_IsDragging = canDrag && true; if (!centerAligned) { m_AlignedDPos = this.transform.position - UF_GetPressPosition(); } if (!string.IsNullOrEmpty(ePressDown)) { MessageSystem.UF_GetInstance().UF_Send(DefineEvent.E_UI_OPERA, ePressDown, eParam, this); } } }
private void UF_UpdateRotate() { if (useDragRotate) { if (!m_IsDrag) { if (DeviceInput.UF_Down(0)) { UF_OnInputDown(); } } else { if (DeviceInput.UF_Up(0)) { UF_OnInputUp(); return; } m_SoundAngle -= DeviceInput.UF_HorizontalDelta(0) * speedRotate; gameObject.transform.localEulerAngles = new Vector3(gameObject.transform.localEulerAngles.x, m_SoundAngle, gameObject.transform.eulerAngles.z); } } }