Esempio n. 1
0
        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 GetMouseButtonDown(IntPtr l)
 {
     int result;
     try
     {
         BaseInput baseInput = (BaseInput)LuaObject.checkSelf(l);
         int button;
         LuaObject.checkType(l, 2, out button);
         bool mouseButtonDown = baseInput.GetMouseButtonDown(button);
         LuaObject.pushValue(l, true);
         LuaObject.pushValue(l, mouseButtonDown);
         result = 2;
     }
     catch (Exception e)
     {
         result = LuaObject.error(l, e);
     }
     return result;
 }