用加速度计Windows Phone 8移动球 [英] Moving a ball with accelerometer Windows Phone 8

查看:83
本文介绍了用加速度计Windows Phone 8移动球的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!



我正在学习Windows Phone 8,我想写一个应用程序,我可以使用加速度计移动图像,而不是一个级别探测器,我希望它像迷宫游戏一样移动。我怎么会这样呢?有没有人有任何好样品/牙龈/解释或类似?我已经在网上搜索了两天,试图整合它。它将用于一个非常简单的学习游戏,因为我从样本中学到很多东西。我已经开始将我的项目作为一个普通的应用程序,因为这是我非常喜欢开发的,UI设计等,我已经创建了一个基本的UI,以及球可以碰撞的东西,像弧和东西之类的东西(控制)。我用C#编写它,我也从java游戏开发中获得了一些知识(不是很多)。



非常感谢!

解决方案

Microsoft轻轻提供如何从Windows Phone的加速计传感器获取数据 [ ^ ]。

一旦你能够获得加速度计输入,你应该轻松​​地进行(粗略)模拟球运动。

Hi!

I'm learning for windows phone 8, and i wanted to write an app where i can move an image using the accelerometer, not a level detector, i want it to move just like in labyrinth games. How would i make this happen? Does anyone have any good samples/turials/explainations or similar? I have been searching the web for two days now, trying to be integrating it. It will be used for a very simple learning-game for myself since i learn alot from samples. I have started my project as a normal app, since this is what i absolutely like to develop with, the UI design, etc, i have already created a basic UI, and also things the ball can collide into, things like arcs and stuff(controls). I am writing it in C#, i also got a little knowledge from java game development (not very much).

Thanks alot!

解决方案

Microsoft gently provides "How to get data from the accelerometer sensor for Windows Phone"[^].
Once you are able to get accelerometer inputs, you should easily do a (rough) simulation the ball movement.


这篇关于用加速度计Windows Phone 8移动球的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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