added PhysicsManager to gamemanager

This commit is contained in:
SergoDobro 2023-08-16 00:42:57 +03:00
parent fc4ce31703
commit 7bdde33394
3 changed files with 5 additions and 4 deletions

View file

@ -3,7 +3,7 @@ using System.Security.Cryptography.X509Certificates;
namespace DangerousD.GameCore.GameObjects;
internal abstract class MapObject : GameObject
public abstract class MapObject : GameObject
{
public bool IsColliderOn;
public MapObject(Vector2 position) : base(position)

View file

@ -17,7 +17,7 @@ namespace DangerousD.GameCore
public List<Entity> entities;
public List<MapObject> mapObjects;
public MapManager mapManager;
public PhysicsManager physicsManager;
public GameManager()
{
@ -56,6 +56,7 @@ namespace DangerousD.GameCore
item.Update(gameTime);
foreach (var item in livingEntities)
item.Update(gameTime);
}
}
}

View file

@ -8,7 +8,7 @@ using Microsoft.Xna.Framework;
namespace DangerousD.GameCore.Managers
{
internal class PhysicsManager
public class PhysicsManager
{
public void UpdateCollisions(List<Entity> entities, List<LivingEntity> livingEntities,
@ -103,7 +103,7 @@ namespace DangerousD.GameCore.Managers
}
public GameObject RayCast(LivingEntity entity1, LivingEntity entity2, )
public GameObject RayCast(LivingEntity entity1, LivingEntity entity2)
{
Rectangle rectangle;