From dee5ed9e69aba83bd4dc34f1979728cf404e1540 Mon Sep 17 00:00:00 2001 From: Simon Holmberg Date: Wed, 31 Oct 2012 23:40:46 +0000 Subject: [PATCH] Open door 1 with O, door 2 with P --- DepthsBelow/DepthsBelow/KeyboardInput.cs | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/DepthsBelow/DepthsBelow/KeyboardInput.cs b/DepthsBelow/DepthsBelow/KeyboardInput.cs index 8d0aed9..166da91 100755 --- a/DepthsBelow/DepthsBelow/KeyboardInput.cs +++ b/DepthsBelow/DepthsBelow/KeyboardInput.cs @@ -207,7 +207,25 @@ namespace DepthsBelow } if (ks.IsKeyUp(Keys.O) && lastKeyboardState.IsKeyDown(Keys.O)) { - EntityManager.GetEntities()[0].Toggle(); + try + { + EntityManager.GetEntities()[0].Toggle(); + } + catch + { + + } + } + if (ks.IsKeyUp(Keys.P) && lastKeyboardState.IsKeyDown(Keys.P)) + { + try + { + EntityManager.GetEntities()[1].Toggle(); + } + catch + { + + } } if (ks.IsKeyDown(Keys.S) || ks.IsKeyDown(Keys.R)) { @@ -247,7 +265,7 @@ namespace DepthsBelow shot.select = true; shot.X = soldier.X; shot.Y = soldier.Y; - shot.Transform.World.Position += soldier.Transform.World.Origin; + //shot.Transform.World.Position += soldier.Transform.World.Origin; //shot.Transform.World.X += Grid.TileSize / 2; //shot.Transform.World.Y += Grid.TileSize / 2; }