{757B5B2E-27C5-43E3-BF29-5025E9DDDBF1}.Release|x86.Build.0 = Release|x86\r
{757B5B2E-27C5-43E3-BF29-5025E9DDDBF1}.Release|Xbox 360.ActiveCfg = Release|x86\r
{757B5B2E-27C5-43E3-BF29-5025E9DDDBF1}.Release|Zune.ActiveCfg = Release|x86\r
- {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Debug|x86.ActiveCfg = Debug|x86\r
- {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Debug|Xbox 360.ActiveCfg = Debug|x86\r
- {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Debug|Zune.ActiveCfg = Debug|x86\r
- {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Release|x86.ActiveCfg = Release|x86\r
- {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Release|Xbox 360.ActiveCfg = Release|x86\r
- {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Release|Zune.ActiveCfg = Release|x86\r
- {4F0BE90F-1E46-4959-80A5-E92B578F6A48}.Debug|x86.ActiveCfg = Debug|x86\r
- {4F0BE90F-1E46-4959-80A5-E92B578F6A48}.Debug|Xbox 360.ActiveCfg = Debug|x86\r
- {4F0BE90F-1E46-4959-80A5-E92B578F6A48}.Debug|Zune.ActiveCfg = Debug|x86\r
- {4F0BE90F-1E46-4959-80A5-E92B578F6A48}.Release|x86.ActiveCfg = Release|x86\r
- {4F0BE90F-1E46-4959-80A5-E92B578F6A48}.Release|Xbox 360.ActiveCfg = Release|x86\r
- {4F0BE90F-1E46-4959-80A5-E92B578F6A48}.Release|Zune.ActiveCfg = Release|x86\r
{EA5996C5-17A9-4827-AAB8-884B476B62EE}.Debug|x86.ActiveCfg = Debug|x86\r
{EA5996C5-17A9-4827-AAB8-884B476B62EE}.Debug|x86.Build.0 = Debug|x86\r
{EA5996C5-17A9-4827-AAB8-884B476B62EE}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360\r
{EA5996C5-17A9-4827-AAB8-884B476B62EE}.Release|Xbox 360.Build.0 = Release|Xbox 360\r
{EA5996C5-17A9-4827-AAB8-884B476B62EE}.Release|Zune.ActiveCfg = Release|Zune\r
{EA5996C5-17A9-4827-AAB8-884B476B62EE}.Release|Zune.Build.0 = Release|Zune\r
+ {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Debug|x86.ActiveCfg = Debug|x86\r
+ {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Debug|Xbox 360.ActiveCfg = Debug|x86\r
+ {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Debug|Zune.ActiveCfg = Debug|x86\r
+ {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Release|x86.ActiveCfg = Release|x86\r
+ {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Release|Xbox 360.ActiveCfg = Release|x86\r
+ {C115BBCA-D6FD-42AF-B2A1-3E895808BC14}.Release|Zune.ActiveCfg = Release|x86\r
EndGlobalSection\r
GlobalSection(SolutionProperties) = preSolution\r
HideSolutionNode = FALSE\r
</Reference>\r
</ItemGroup>\r
<ItemGroup>\r
+ <Compile Include="Character.cs" />\r
<Compile Include="ChatInfo.cs" />\r
<Compile Include="Game.cs" />\r
<Compile Include="IDeterministicGame.cs" />\r
<Compile Include="MapReader.cs" />\r
<Compile Include="NetworkManager.cs" />\r
<Compile Include="Parse.cs" />\r
+ <Compile Include="Projectile.cs" />\r
<Compile Include="Properties\AssemblyInfo.cs" />\r
<Compile Include="Program.cs" />\r
<Compile Include="XnaGame.cs" />\r
\r
\r
}\r
-\r
+ /*\r
/// <summary>\r
/// Updates the players position in the current window, the player is kept centered\r
/// in the window when possible. When the edge of the map is reached by one or more\r
/// <param name="ScreenHeight">Used to know how tall the current window is</param>\r
public void updatePlayerScreenPosition(int ScreenWidth, int ScreenHeight)\r
{\r
+\r
// if left edge of map has been reached by screen\r
if (GridX * TheMap.GridToPixelRatio < ScreenWidth / 2)\r
{\r
PixelY = ScreenHeight / 2;\r
}\r
}\r
-\r
+ */\r
/// <summary>\r
/// Moves the current player being controlled based on a given set of key presses.\r
/// The player can only move one Grid space per movePlayer call. Thus this method\r
{\r
// move upleft\r
keysPressed.Contains<Keys>(Keys.Left);\r
- if (keysPressed.Contains<Keys>(Keys.Up) && keysPressed.Contains<Keys>(Keys.Left) && TheMap.isOpenSquare(GridX - 1, GridY - 1))\r
+ if (keysPressed.Contains<Keys>(Keys.Up) && keysPressed.Contains<Keys>(Keys.Left) && TheMap.IsCellOpen(GridX - 1, GridY - 1))\r
{\r
GridX -= 1;\r
GridY -= 1;\r
}\r
// move upright\r
- else if (keysPressed.Contains<Keys>(Keys.Up) && keysPressed.Contains<Keys>(Keys.Right) && TheMap.isOpenSquare(GridX + 1, GridY - 1))\r
+ else if (keysPressed.Contains<Keys>(Keys.Up) && keysPressed.Contains<Keys>(Keys.Right) && TheMap.IsCellOpen(GridX + 1, GridY - 1))\r
{\r
GridX += 1;\r
GridY -= 1;\r
}\r
// move downleft\r
- else if (keysPressed.Contains<Keys>(Keys.Down) && keysPressed.Contains<Keys>(Keys.Left) && TheMap.isOpenSquare(GridX - 1, GridY + 1))\r
+ else if (keysPressed.Contains<Keys>(Keys.Down) && keysPressed.Contains<Keys>(Keys.Left) && TheMap.IsCellOpen(GridX - 1, GridY + 1))\r
{\r
GridX -= 1;\r
GridY += 1;\r
}\r
// move downright\r
- else if (keysPressed.Contains<Keys>(Keys.Down) && keysPressed.Contains<Keys>(Keys.Right) && TheMap.isOpenSquare(GridX + 1, GridY + 1))\r
+ else if (keysPressed.Contains<Keys>(Keys.Down) && keysPressed.Contains<Keys>(Keys.Right) && TheMap.IsCellOpen(GridX + 1, GridY + 1))\r
{\r
GridX += 1;\r
GridY += 1;\r
}\r
// move up\r
- else if (keysPressed.Contains<Keys>(Keys.Up) && TheMap.isOpenSquare(GridX, GridY - 1))\r
+ else if (keysPressed.Contains<Keys>(Keys.Up) && TheMap.IsCellOpen(GridX, GridY - 1))\r
{\r
GridY -= 1;\r
}\r
// move down\r
- else if (keysPressed.Contains<Keys>(Keys.Down) && TheMap.isOpenSquare(GridX, GridY + 1))\r
+ else if (keysPressed.Contains<Keys>(Keys.Down) && TheMap.IsCellOpen(GridX, GridY + 1))\r
{\r
GridY += 1;\r
}\r
// move left\r
- else if (keysPressed.Contains<Keys>(Keys.Left) && TheMap.isOpenSquare(GridX - 1, GridY))\r
+ else if (keysPressed.Contains<Keys>(Keys.Left) && TheMap.IsCellOpen(GridX - 1, GridY))\r
{\r
GridX -= 1;\r
}\r
// move right\r
- else if (keysPressed.Contains<Keys>(Keys.Right) && TheMap.isOpenSquare(GridX + 1, GridY))\r
+ else if (keysPressed.Contains<Keys>(Keys.Right) && TheMap.IsCellOpen(GridX + 1, GridY))\r
{\r
GridX += 1;\r
}\r
\r
}\r
}\r
- /*\r
- //this is for testing purposes only!\r
- public class Map\r
- {\r
- int gridToPixelRatio;\r
-\r
- public Map()\r
- {\r
- gridToPixelRatio = 10;\r
- }\r
-\r
- public int MaxGridX\r
- {\r
- get { return 100; }\r
- }\r
- public int MaxGridY\r
- {\r
- get { return 100; }\r
- }\r
-\r
- public int GridToPixelRatio\r
- {\r
- get { return gridToPixelRatio; }\r
- }\r
-\r
- public bool isOpenSquare(int GridX, int GridY)\r
- {\r
- return true;\r
- }\r
-\r
-\r
- }\r
- */\r
}
\ No newline at end of file
public void Update()\r
{\r
//See if something moved onto this projectile.\r
- if(theMap.isOpenSquare(gridX, gridY))\r
+ if(theMap.IsCellOpen(gridX, gridY))\r
{\r
- theMap.damageSquare(gridX, gridY, damage);\r
+ //theMap.damageSquare(gridX, gridY, damage);\r
}\r
//If the projectile will be moving to a new grid position we need to check to see if it is occupied.\r
+ /*\r
if ((int)((pixelX + velocity.X) / theMap.gridToPixelRatio) != gridX || (int)((pixelY + velocity.Y) / Map.gridToPixelRatio) != gridY)\r
{\r
- bool open = theMap.isOpenSquare((pixelX + velocity.X) / theMap.gridToPixelRatio, (pixelY + velocity.Y) / Map.gridToPixelRatio);\r
+ bool open = theMap.IsCellOpen((pixelX + velocity.X) / theMap.gridToPixelRatio, (pixelY + velocity.Y) / Map.gridToPixelRatio);\r
//If open just move this projectile there\r
//***Map doesn't need to know that this projectile is there because players/monsters are allowed\r
// to move into the path of projectiles.\r
//theMap.damageSquare(gridX, gridY, damage);\r
}\r
}\r
+ */\r
//If it is not moving grid positions just increment pixelX and pixelY\r
else\r
{\r
</Reference>\r
</ItemGroup>\r
<ItemGroup>\r
- <Compile Include="Character.cs" />\r
- <Compile Include="Projectile.cs" />\r
<Compile Include="Properties\AssemblyInfo.cs" />\r
<Compile Include="Program.cs" />\r
<Compile Include="Game1.cs" />\r