Пример #1
0
        public TouchLayerLua(int layerIndex, LuaTable luaModule)
        {
            _luaModule = luaModule;

            _layer = new LayerInfo(layerIndex);
            _layer[TouchEventType.Tap]        = OnTouchSceneObject;
            _layer[TouchEventType.TouchStart] = OnTouchStartSceneObject;
            _layer[TouchEventType.TouchEnd]   = OnTouchEndSceneObject;
            _layer[TouchEventType.DragBegin]  = delegate(Gesture gt)
            {
                return(_call(FUNC_NAME_ON_DRAG_START, gt));
            };
            _layer[TouchEventType.Drag] = delegate(Gesture gt)
            {
                return(_call(FUNC_NAME_ON_DRAG, gt));
            };
            _layer[TouchEventType.DragEnd] = delegate(Gesture gt)
            {
                return(_call(FUNC_NAME_ON_DRAG_END, gt));
            };
        }
 public void RemoveLayer(LayerInfo layer)
 {
     _allLayers.Remove(layer.Layer);
 }