通过在屏幕的指定区域中使用 touchmoved 来移动精灵
我正在制作一个应用程序,因为我想在屏幕的指定区域移动精灵,使用cocos2d我无法移动精灵,我只知道方法 -(void)ccTouchMoved:(UITouch *)touches withEvent:(UIEvent *)event,但我不知道如何移动精灵,
有人可以帮助我吗???
提前致谢
I am making an application, in that I want to move the sprite in a specified region of the screen, With cocos2d I am not able to make move of sprite, I only know the method -(void)ccTouchMoved:(UITouch *)touches withEvent:(UIEvent *)event, but I don't know how to move a sprite,
can any one help me????
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试如下操作。
编辑:如果您只是想在没有触摸事件的情况下移动精灵,只需调用
Try something like the following.
Edit: If you simply want to move the sprite without a touch event simply call