This commit is contained in:
N4K 2023-08-17 17:29:59 +03:00
commit 833da68a4e
5 changed files with 5 additions and 5 deletions

View file

@ -55,7 +55,7 @@ namespace DangerousD.GameCore
{ {
GraphicsComponent.DrawAnimation(Rectangle, spriteBatch); GraphicsComponent.DrawAnimation(Rectangle, spriteBatch);
//debug //debug
spriteBatch.Draw(debugTexture,new Rectangle(Rectangle.X-GraphicsComponent.CameraPosition.X,Rectangle.Y-GraphicsComponent.CameraPosition.Y,Rectangle.Width,Rectangle.Height), Color.White); //wdaspriteBatch.Draw(debugTexture,new Rectangle(Rectangle.X-GraphicsComponent.CameraPosition.X,Rectangle.Y-GraphicsComponent.CameraPosition.Y,Rectangle.Width,Rectangle.Height), Color.White);
} }
} }

View file

@ -27,7 +27,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
{ {
Width = 24; Width = 24;
Height = 40; Height = 40;
monster_speed = 3; monster_speed = 1;
name = "Zombie"; name = "Zombie";
leftBorder = (int)position.X - 100; leftBorder = (int)position.X - 100;
rightBorder = (int)position.X + 100; rightBorder = (int)position.X + 100;

View file

@ -14,7 +14,7 @@ public class Platform : MapObject
{ {
base.Draw(spriteBatch); base.Draw(spriteBatch);
//debug //debug
spriteBatch.Draw(debugTexture, new Rectangle(Rectangle.X - GraphicsComponent.CameraPosition.X, Rectangle.Y - GraphicsComponent.CameraPosition.Y, Rectangle.Width, Rectangle.Height), Color.White); //spriteBatch.Draw(debugTexture, new Rectangle(Rectangle.X - GraphicsComponent.CameraPosition.X, Rectangle.Y - GraphicsComponent.CameraPosition.Y, Rectangle.Width, Rectangle.Height), Color.Blue);
} }

View file

@ -14,7 +14,7 @@ public class StopTile : MapObject
{ {
base.Draw(spriteBatch); base.Draw(spriteBatch);
//debug //debug
spriteBatch.Draw(debugTexture, new Rectangle(Rectangle.X - GraphicsComponent.CameraPosition.X, Rectangle.Y - GraphicsComponent.CameraPosition.Y, Rectangle.Width, Rectangle.Height), Color.White); // spriteBatch.Draw(debugTexture, new Rectangle(Rectangle.X - GraphicsComponent.CameraPosition.X, Rectangle.Y - GraphicsComponent.CameraPosition.Y, Rectangle.Width, Rectangle.Height), Color.White);
} }
} }

View file

@ -48,7 +48,7 @@ namespace DangerousD.GameCore.Managers
oldRect.Offset((int)currentEntity.velocity.X, 0); oldRect.Offset((int)currentEntity.velocity.X, 0);
for (int j = 0; j < mapObjects.Count; j++) for (int j = 0; j < mapObjects.Count; j++)
{ {
if (Math.Abs(mapObjects[i].Pos.X - currentEntity.Pos.X) < currentEntity.velocity.X * 2 && Math.Abs(mapObjects[i].Pos.Y - currentEntity.Pos.Y) < 50) if (Math.Abs(mapObjects[i].Pos.X - currentEntity.Pos.X) < 550 && Math.Abs(mapObjects[i].Pos.Y - currentEntity.Pos.Y) < 550)
{ {
if (oldRect.Intersects(mapObjects[j].Rectangle)) if (oldRect.Intersects(mapObjects[j].Rectangle))
{ {