手机Android的斜率 [英] Phone slope Android
问题描述
我想写的Android游戏,我需要以某种方式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屋!