问题描述
我开发game.i我在屏幕上显示的screen.when用户水龙头的枪对象底部中间我需要旋转枪direction.i做旋转image.but时,屏幕上的用户敲击我需要旋转图像方向。可以请你帮我
i am developing game.i am displaying gun object center bottom of the screen.when user tap on screen i need to rotate gun that direction.i done rotating image.but when user tap on screen i need to rotate image that direction.can you please help me
在此先感谢
阿斯旺
推荐答案
是您的图像的位图?你能不能把它转换为一个?将一个onClick监听器不工作,当用户点击执行类似.. HTTP:// WWW .anddev.org / resize_and_rotate_image _-_例如,t621.html
is your image a bitmap? could you convert it to one? Would an onClick listener not work and when the user clicks do something like.. http://www.anddev.org/resize_and_rotate_image_-_example-t621.html
看到一些code,以什么你试图将是很好也。下面将帮助您如果位图已被点击的情况下,我们不得不为也的。我从来没有attemped这一点我自己,但我认为这是可行的。尝试重绘位图,当您调整它。
Seeing some code as to what you've attempting would be nice also. The following will help you with checking if the bitmap has been clicked in case you're stuck on that also http://developer.android.com/reference/android/view/View.html .I've never attemped this myself but I think that would work. Try redrawing the bitmap when you have resized it.
这篇关于根据屏幕上的用户触摸旋转图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!