如何在线上移动球? [英] how to move ball with in the lines ?

查看:83
本文介绍了如何在线上移动球?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Android很新,所以任何人都可以帮助PLZ如何在终点移动球,我想在显示中绘制线条并在线条中上下移动,使用传感器,加速度计,你可以发送plz

解决方案

我是像你自己的新手,我没有代码解决方案,但我有一个理论上的解决方案,那就是,首先你需要有触摸事件来读取用户绘制线条的时间和位置,这些线条需要转换为对象,坐标也得到,然后你需要编写代码来管理球击中墙壁时发生的事情。我很抱歉缺少代码,但我刚开始在Android中。



希望这有助于搜索一些例子。


iam new to android so anybody help plz how to move the ball with in the end points , i want draw the lines in display &with in the lines the moves up & down ,using the sensor,accelerometer, can u send plz

解决方案

I am new to android like yourself, i do not have the code solution however, i have a theoretical solution and that is, First of all you will need to have touch events to read when and where the user draws the lines, those lines will need to be converted to objects, coordinates got also, then you will need to write code to manage what happens when the ball hits the walls. Im sorry about the lack of code but im just starting in android also.

Hope this helps a little to search for examples.


这篇关于如何在线上移动球?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆