“How To Make a Tile-Based Game with Cocos2D 2.X” Make this tutorial with cocos2d V3

自古美人都是妖i 提交于 2019-12-02 01:51:43

The problem is that the area of the user interaction is by default bound to the contentSize of the scene (screen size).

When calling your setViewPointCenter method, you are moving the scene position out of this area where the touch event is not handled.

You have to extend this area of the contentSize of the tile map like that :

[self setContentSize:[_tileMap contentSize]];
self.userInteractionEnabled = YES;
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!