需要Xna问题帮助 [英] Xna Question Help needed

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

问题描述

我想在屏幕中间显示一个火箭。

问题是如果我为宽度和高度设置一个固定值(例如,宽度= 600,高度= 800),火箭将出现在某些计算机的中心,而不是其他分辨率不同的计算机。我如何输入代码来获取计算机的屏幕,以便火箭显示在每台计算机的中心?(例如宽度=(屏幕宽度) )/ 2 height =(屏幕高度)/ 2)

I want to display a rocket in the middle of the screen.
The problem is if I set a fixed value for width and height(eg. width=600,height=800),the rocket will appear in centre for some computers and not for other computers of different resolution.How can I enter code to get the screen rosultion of the computer so that the rocket is displayed in the centre of every computer?( eg width=(screen width)/2 height=(screen height)/2 )

推荐答案

这里: http://stackoverflow.com/questions/1377524/xna-get-screens-width-and-height [ ^ ]。



请注意答案作者写的字:只是用Google搜索xna屏幕宽度高度我自己。也许它会给你一些有用的想法。 :-)



-SA


这篇关于需要Xna问题帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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