diff -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 -r 116059c86b12644822eb811b908b19b40d8e45cf Snake.sln --- a/Snake.sln Wed Aug 22 22:03:36 2012 -0500 +++ b/Snake.sln Sat Aug 25 01:00:23 2012 -0500 @@ -5,6 +5,8 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "axios_snakeContent", "axios_snake\axios_snakeContent\axios_snakeContent.contentproj", "{664607B5-E371-44CA-A2D0-A7ECF21237A7}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "axios_snake WP", "axios_snake\axios_snake\axios_snake WP.csproj", "{DCD6AFFE-B920-4B3C-B01C-130DA3B69271}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Mixed Platforms = Debug|Mixed Platforms @@ -33,6 +35,20 @@ {664607B5-E371-44CA-A2D0-A7ECF21237A7}.Release|Mixed Platforms.ActiveCfg = Release|x86 {664607B5-E371-44CA-A2D0-A7ECF21237A7}.Release|Windows Phone.ActiveCfg = Release|x86 {664607B5-E371-44CA-A2D0-A7ECF21237A7}.Release|x86.ActiveCfg = Release|x86 + {DCD6AFFE-B920-4B3C-B01C-130DA3B69271}.Debug|Mixed Platforms.ActiveCfg = Debug|Windows Phone + {DCD6AFFE-B920-4B3C-B01C-130DA3B69271}.Debug|Mixed Platforms.Build.0 = Debug|Windows Phone + {DCD6AFFE-B920-4B3C-B01C-130DA3B69271}.Debug|Mixed Platforms.Deploy.0 = Debug|Windows Phone + {DCD6AFFE-B920-4B3C-B01C-130DA3B69271}.Debug|Windows Phone.ActiveCfg = Debug|Windows Phone + {DCD6AFFE-B920-4B3C-B01C-130DA3B69271}.Debug|Windows Phone.Build.0 = Debug|Windows Phone + {DCD6AFFE-B920-4B3C-B01C-130DA3B69271}.Debug|Windows Phone.Deploy.0 = Debug|Windows Phone + {DCD6AFFE-B920-4B3C-B01C-130DA3B69271}.Debug|x86.ActiveCfg = Debug|Windows Phone + {DCD6AFFE-B920-4B3C-B01C-130DA3B69271}.Release|Mixed Platforms.ActiveCfg = Release|Windows Phone + {DCD6AFFE-B920-4B3C-B01C-130DA3B69271}.Release|Mixed Platforms.Build.0 = Release|Windows Phone + {DCD6AFFE-B920-4B3C-B01C-130DA3B69271}.Release|Mixed Platforms.Deploy.0 = Release|Windows Phone + {DCD6AFFE-B920-4B3C-B01C-130DA3B69271}.Release|Windows Phone.ActiveCfg = Release|Windows Phone + {DCD6AFFE-B920-4B3C-B01C-130DA3B69271}.Release|Windows Phone.Build.0 = Release|Windows Phone + {DCD6AFFE-B920-4B3C-B01C-130DA3B69271}.Release|Windows Phone.Deploy.0 = Release|Windows Phone + {DCD6AFFE-B920-4B3C-B01C-130DA3B69271}.Release|x86.ActiveCfg = Release|Windows Phone EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 -r 116059c86b12644822eb811b908b19b40d8e45cf Snake.suo Binary file Snake.suo has changed diff -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 -r 116059c86b12644822eb811b908b19b40d8e45cf axios_snake/axios_snake/Background.png Binary file axios_snake/axios_snake/Background.png has changed diff -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 -r 116059c86b12644822eb811b908b19b40d8e45cf axios_snake/axios_snake/PhoneGameThumb.png Binary file axios_snake/axios_snake/PhoneGameThumb.png has changed diff -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 -r 116059c86b12644822eb811b908b19b40d8e45cf axios_snake/axios_snake/SnakeScreen.cs --- a/axios_snake/axios_snake/SnakeScreen.cs Wed Aug 22 22:03:36 2012 -0500 +++ b/axios_snake/axios_snake/SnakeScreen.cs Sat Aug 25 01:00:23 2012 -0500 @@ -16,8 +16,6 @@ { private Ball ball; - private KeyboardState currentKeyState; - private List snake; private SpriteFont scoreFont; @@ -97,6 +95,44 @@ init(); } + public override void HandleInput(GameTime gameTime, InputState input) + { + base.HandleInput(gameTime, input); + if (input.CurrentKeyboardStates[0].IsKeyDown(Keys.Right) || (input.VirtualState.ThumbSticks.Left.X > .50) ) + { + if (!left) + { + right = true; + left = up = down = false; + } + } + else if (input.CurrentKeyboardStates[0].IsKeyDown(Keys.Left) || (input.VirtualState.ThumbSticks.Left.X < -.50) ) + { + if (!right) + { + left = true; + right = up = down = false; + } + } + else if (input.CurrentKeyboardStates[0].IsKeyDown(Keys.Up) || (input.VirtualState.ThumbSticks.Left.Y > .50) ) + { + if (!down) + { + up = true; + down = left = right = false; + } + } + else if (input.CurrentKeyboardStates[0].IsKeyDown(Keys.Down) || (input.VirtualState.ThumbSticks.Left.Y < -.50)) + { + if (!up) + { + down = true; + up = left = right = false; + } + } + + } + public override void Draw(GameTime gameTime) { @@ -109,6 +145,7 @@ public override void Update(GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen) { base.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen); + if (play) { @@ -125,39 +162,7 @@ AddGameObject(snake[snake.Count - 1]); } - currentKeyState = Keyboard.GetState(); - if (currentKeyState.IsKeyDown(Keys.Right)) - { - if (!left) - { - right = true; - left = up = down = false; - } - } - else if (currentKeyState.IsKeyDown(Keys.Left)) - { - if (!right) - { - left = true; - right = up = down = false; - } - } - else if (currentKeyState.IsKeyDown(Keys.Up)) - { - if (!down) - { - up = true; - down = left = right = false; - } - } - else if (currentKeyState.IsKeyDown(Keys.Down)) - { - if (!up) - { - down = true; - up = left = right = false; - } - } + if (right) { diff -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 -r 116059c86b12644822eb811b908b19b40d8e45cf axios_snake/axios_snake/axios_snake WP.csproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/axios_snake/axios_snake/axios_snake WP.csproj Sat Aug 25 01:00:23 2012 -0500 @@ -0,0 +1,155 @@ + + + + {DCD6AFFE-B920-4B3C-B01C-130DA3B69271} + {6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Debug + Windows Phone + Library + Properties + axios_snake + axios_snake + v4.0 + Client + v4.0 + Windows Phone + Reach + ade2d9b7-dbb9-48bc-a588-b933b9042bfc + Game + Game.ico + GameThumbnail.png + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + 1 + $(AssemblyName).xap + Properties\AppManifest.xml + Properties\WMAppManifest.xml + Background.png + $(AssemblyName) + + + + bin\Windows Phone\Release + prompt + 4 + true + false + pdbonly + true + TRACE;WINDOWS_PHONE + false + + + bin\Windows Phone\Debug + prompt + 4 + true + false + true + full + false + DEBUG;TRACE;WINDOWS_PHONE + false + + + + axios_snakeContent %28Content%29 + Content + {664607B5-E371-44CA-A2D0-A7ECF21237A7} + + + + + + + + + + + + + + + + + + + + true + + + true + + + true + + + true + + + + + False + Microsoft .NET Framework 4 Client Profile %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + False + Microsoft XNA Framework Redistributable 4.0 + true + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 665b15b7f8d3c8da121bbf39559f64b3801d3535 -r 116059c86b12644822eb811b908b19b40d8e45cf axios_snake/axios_snake/axios_snake.csproj.user --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/axios_snake/axios_snake/axios_snake.csproj.user Sat Aug 25 01:00:23 2012 -0500 @@ -0,0 +1,13 @@ + + + + + + + + + + en-US + false + + \ No newline at end of file