cocos2d / cocos2d-x

Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.
https://www.cocos.com/en/cocos2d-x
18.21k stars 7.06k forks source link

Cocos2d-x Prevent mouse click location triggered when offscreen #16255

Open meiry opened 8 years ago

meiry commented 8 years ago

Then in main.js i set it to be :

cc.view.setDesignResolutionSize(960, 640, cc.ResolutionPolicy.SHOW_ALL);

but when i click out side the game canvas the sprite moving off screen , how can i prevent it without doing manual screen calculation or this is the only why ?

here is a picture : http://discuss.cocos2d-x.org/t/how-to-prevent-click-location-trigger-when-offscreen/31081

minggo commented 8 years ago

thanks, i added an item browser type and version in issue template

Ronalses commented 8 years ago

hola. si programo en JS puedo compilar para todas las plataformas?

Hi. if I program in JS I can compile for all platforms ?

mateosss commented 8 years ago

@Ronalc yes you can... Use the forum for questions: http://discuss.cocos2d-x.org and Don't ask questions not related to the issue.