Example #1
0
        void DoCheckPointer()
        {
            bool isOver = false;

            if (pointerId.IsNone)
            {
                isOver = EventSystem.current.IsPointerOverGameObject();
            }
            else
            {
                if (EventSystem.current.currentInputModule is PointerInputModule)
                {
                    PointerInputModule _module = EventSystem.current.currentInputModule as PointerInputModule;
                    isOver = _module.IsPointerOverGameObject(pointerId.Value);
                }
            }

            isPointerOverUI.Value = isOver;

            if (isOver)
            {
                Fsm.Event(pointerOverUI);
            }
            else
            {
                Fsm.Event(pointerNotOverUI);
            }
        }
Example #2
0
    public static int IsPointerOverGameObject(IntPtr l)
    {
        int result;

        try
        {
            PointerInputModule pointerInputModule = (PointerInputModule)LuaObject.checkSelf(l);
            int pointerId;
            LuaObject.checkType(l, 2, out pointerId);
            bool b = pointerInputModule.IsPointerOverGameObject(pointerId);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, b);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }