Phone slope Android
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) ?
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 example on how to use phone's sensor:
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/os/Sensors.html
精彩评论