public void FixedUpdate() { if (mJoystick == null) { mJoystick = mUIModule.GetUI <NFUIJoystick>(); if (mJoystick) { mJoystick.SetKeyPressViewSyncHandler(JoyOnKeyPressViewSyncHandler); mJoystick.SetKeyPressModelLoadHandler(JoyOnKeyPressModelLoadHandler); mJoystick.SetKeyPressModelSwitchHandler(JoyOnKeyPressModelSwitchHandler); mJoystick.SetKeyPressGetModelListHandler(JoyOnKeyPressGetModelListHandler); } } if (fLastEventTime > 0f && Time.time > (fLastEventTime + 0.1f)) { fLastEventTime = Time.time; } }
public void Update() { if (mJoystick == null) { mJoystick = mUIModule.GetUI <NFUIJoystick>(); if (mJoystick) { mJoystick.SetPointerDownHandler(JoyOnPointerDownHandler); mJoystick.SetPointerDragHandler(JoyOnPointerDragHandler); mJoystick.SetPointerUpHandler(JoyOnPointerUpHandler); } } if (fLastEventTime > 0f && Time.time > (fLastEventTime + 0.2f)) { fLastEventTime = Time.time; MoveEvent(fLastEventdirection); } }