12 2011 档案
摘要: 首先,我为动画精灵创建一个类 1: public class AnimatedSprite 2: { 3: Point _frameSize; 4: int _currentFrame; 5: private readonly int _frame = 4; 6: private readonly Texture2D _sprite; 7: public AnimatedSprite(Texture2D texture, int fra...阅读全文
摘要: 在XNA中,可以通过GraphicsDeviceManager提供的ToggleFullScreen来进行全屏状态转换 通常的游戏中,都会使用Alt+Enter来进行全屏状态切换,所以我们可以在Update中使用如下代码进行全屏切换 1: protected override void Update(GameTime gameTime) 2: 3: { 4: 5: if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pre...阅读全文

