Quantcast
Channel: Cocos中文社区 - 最新主题
Viewing all articles
Browse latest Browse all 88737

Cc.EventListener.create的问题

$
0
0

@panli32811 写道:

            this._onTouch = cc.EventListener.create({
                event: cc.EventListener.TOUCH_ONE_BY_ONE,
                swallowTouches: true,
                onTouchBegan: function (touch, event) {
                    return false;
                },
            });

用该函数创建的监听器貌似只能使用一次,在add到eventManager后再remove掉,当再次add到eventManager的时候就会报错Invalid Native Object

帖子: 2

参与者: 1

阅读整个主题


Viewing all articles
Browse latest Browse all 88737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>