Permalink
Browse files

movin' buttons, changin' strings

  • Loading branch information...
1 parent 3db866a commit a960b74b526c0d4ad5cd58127e32ff2167bdbed9 @vogon vogon committed Apr 1, 2012
@@ -4,6 +4,7 @@
using System.Text;
using XNAVERGE;
using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Input;
using FarseerPhysics.Collision.Shapes;
using FarseerPhysics.Dynamics;
using FarseerPhysics.Dynamics.Contacts;
@@ -78,11 +79,12 @@ class DemonController : IDrawableThing, ICollidable {
//Console.WriteLine( "DEMON State: " + sprite.CurrentState.ToString() );
- if( Game1.game.action.cancel.pressed && sprite.CurrentState == DemonSprite.AnimationState.Idle ) {
+ if(GamePad.GetState(PlayerIndex.One).Buttons.X == ButtonState.Pressed && sprite.CurrentState == DemonSprite.AnimationState.Idle ) {
sprite.SetAnimationState( DemonSprite.AnimationState.Disappearing, 0 );
}
- if( !Game1.game.action.cancel.down && sprite.CurrentState == DemonSprite.AnimationState.Hidden ) {
+ if (GamePad.GetState(PlayerIndex.One).Buttons.X == ButtonState.Released && sprite.CurrentState == DemonSprite.AnimationState.Hidden)
+ {
sprite.SetAnimationState( DemonSprite.AnimationState.Reappearing, 0 );
}
@@ -48,7 +48,7 @@ internal override string BgBgBg
internal override void Update(Microsoft.Xna.Framework.GameTime gameTime)
{
- if (Game1.game.action.confirm.pressed || Keyboard.GetState(PlayerIndex.One).IsKeyDown(Keys.Space) )
+ if (GamePad.GetState(PlayerIndex.One).IsButtonDown(Buttons.B))
{
Game1 game1 = Game1.game as Game1;
@@ -67,14 +67,13 @@ private void DrawDeathMessage(SpriteBatch batch, string text, int y, Color color
internal override void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch batch, Microsoft.Xna.Framework.GameTime gameTime)
{
Game1 game1 = (Game1)Game1.game;
- Vector2 size;
Color color = Color.White;
DrawDeathMessage(batch, "You were slain by a flying corpse,", 20, color);
DrawDeathMessage(batch, "borne aloft on the wings of your", 60, color);
DrawDeathMessage(batch, "revolving door.", 100, color);
- //DrawCentered(batch, "What a shame.", 280, color);
+ DrawDeathMessage(batch, "Press B to try again.", 180, color);
//DrawCentered(batch, "- game over -", 360, Color.Red);
}
@@ -67,7 +67,7 @@ internal override void Update(Microsoft.Xna.Framework.GameTime gameTime)
internal override void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch batch, Microsoft.Xna.Framework.GameTime gameTime)
{
Game1 game1 = (Game1)Game1.game;
- string doorSpeedDesc = string.Format("press start to possess... the");
+ string doorSpeedDesc = string.Format("press A to possess... the");
Vector2 size = game1.ft_hud24.MeasureString(doorSpeedDesc);
batch.DrawString(game1.ft_hud24, doorSpeedDesc, new Vector2 { X = (640 - size.X) / 2, Y = 240 }, Color.White);

0 comments on commit a960b74

Please sign in to comment.