手机Android的斜率 [英] Phone slope Android

查看:140
本文介绍了手机Android的斜率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想写的Andr​​oid游戏,我需要以某种方式AI手机里面斜坡使用(以学位或任何其他措施)。谁能告诉我该怎么做(链接或code样品)?

I want to write game for Android and I need to use inside AI phone slope in some way ( in degree or any other measure). Can anybody tell me how to do that(link or code sample) ?

推荐答案

您的意思是使用手机的运动传感器(即油门,方向)?
从Android SDK中APIDemos始终是一个良好的开端:

Did you mean to use phone's movement sensors (ie. accelerator, orientation)? APIDemos from Android SDK are always a good start:

http://developer.android.com/resources/samples/ApiDemos/ index.html的

code例如:

<一个href=\"http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/os/Sensors.html\" rel=\"nofollow\">http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/os/Sensors.html

这篇关于手机Android的斜率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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