physics fix pack 3
This commit is contained in:
parent
a327e1b480
commit
9b346891f2
5 changed files with 5 additions and 5 deletions
|
@ -55,7 +55,7 @@ namespace DangerousD.GameCore
|
|||
{
|
||||
GraphicsComponent.DrawAnimation(Rectangle, spriteBatch);
|
||||
//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);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
|
|||
{
|
||||
Width = 24;
|
||||
Height = 40;
|
||||
monster_speed = 3;
|
||||
monster_speed = 1;
|
||||
name = "Zombie";
|
||||
leftBorder = (int)position.X - 100;
|
||||
rightBorder = (int)position.X + 100;
|
||||
|
|
|
@ -14,7 +14,7 @@ public class Platform : MapObject
|
|||
{
|
||||
base.Draw(spriteBatch);
|
||||
//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);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ public class StopTile : MapObject
|
|||
{
|
||||
base.Draw(spriteBatch);
|
||||
//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);
|
||||
|
||||
}
|
||||
}
|
|
@ -48,7 +48,7 @@ namespace DangerousD.GameCore.Managers
|
|||
oldRect.Offset((int)currentEntity.velocity.X, 0);
|
||||
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))
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue