问题描述
如何在屏幕的Android移动图像?
How to move an image across the screen android?
大家好,即时通讯创造MoleMash游戏我的课程,我真的需要帮助!我想尝试在屏幕上移动一个图像(摩尔)在不同的和随机的坐标,以便它可以被用户触摸以获取一个分数。我创建了我所做的图像视图的背景。我有痣,它是另一种形象的看法?或者是一个图像按钮?
Guys, im creating MoleMash game for My Coursework and I really need help!. I want to try to move a image (the mole) across the screen in different and random coordinates so that it can be touched by the user to get a score. I created the background which I made the image view. I have the mole, Is it another image view? or is it a Image button?
我如何推动这一跨越到屏幕的不同部分对用户进行交互?
And how do I move this across to different parts of the screen for the user interact?
我将不胜AP preciate您的帮助!
I would greatly appreciate your help!
推荐答案
有关游戏的发展,你需要学习如何使用帆布和SurfaceView:How我可以使用画布里面的动画框架?
For games development you need to learn how to use canvas and SurfaceView: How can I use the animation framework inside the canvas?
使用onTouch事件监听器,你会与你的动画图像的位置与触摸位置...
Using onTouch event listener you would compare the touch location with the location of your animated images...
这篇关于如何在屏幕上移动一个图像上的Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!