private void ProcessEvent(IEventSystemHandler handler, BaseEventData eventData) { // Debug.LogError("process event " + Environment.StackTrace + " " + recordInput.GetMouseButtonUp(0)); if (!didProcessThisFrame) { //Debug.LogError("Process event!"); didProcessThisFrame = true; if (recordInput.GetMouseButtonDown(0)) { CreateTouchWriter(handler); } if (currentInputWriter == null) { //Debug.LogError("Receive Event but not recorder!"); return; } currentInputWriter.ReceiveEvent(eventData as PointerEventData); //frameCount = 0; if (recordInput.GetMouseButtonUp(0)) { DestroyWriter(); } } }
public static int GetMouseButtonUp(IntPtr l) { int result; try { BaseInput baseInput = (BaseInput)LuaObject.checkSelf(l); int button; LuaObject.checkType(l, 2, out button); bool mouseButtonUp = baseInput.GetMouseButtonUp(button); LuaObject.pushValue(l, true); LuaObject.pushValue(l, mouseButtonUp); result = 2; } catch (Exception e) { result = LuaObject.error(l, e); } return result; }