UpdateComponentCollision

This commit is contained in:
PetrKu09 2024-08-16 00:33:26 +03:00
parent 16a40586e7
commit d29b8c39cc
2 changed files with 15 additions and 60 deletions

View file

@ -1,52 +0,0 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
namespace ZoFo;
public class Game1 : Game
{
private GraphicsDeviceManager _graphics;
private SpriteBatch _spriteBatch;
public Game1()
{
_graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
IsMouseVisible = true;
}
protected override void Initialize()
{
// TODO: Add your initialization logic here
base.Initialize();
}
protected override void LoadContent()
{
_spriteBatch = new SpriteBatch(GraphicsDevice);
// TODO: use this.Content to load your game content here
}
protected override void Update(GameTime gameTime)
{
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed ||
Keyboard.GetState().IsKeyDown(Keys.Escape))
Exit();
// TODO: Add your update logic here
base.Update(gameTime);
}
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.CornflowerBlue);
// TODO: Add your drawing code here
base.Draw(gameTime);
}
}

View file

@ -7,16 +7,18 @@ using System.Text;
using System.Threading.Tasks;
using ZoFo.GameCore.GameObjects;
using ZoFo.GameCore.GameManagers.CollisionManager;
using Microsoft.Xna.Framework;
using ZoFo.GameCore.GameManagers.MapManager.MapElements;
namespace ZoFo.GameCore.GameManagers.CollisionManager
{
public class CollisionManager
{
Player player;
public List<CollisionComponent> CollisionComponent;
public List<CollisionComponent> TriggerComponent;
public static bool CheckComponentCollision(List<CollisionComponent> collisionComponents, CollisionComponent component)
{
foreach (var collisionComponent in collisionComponents)
@ -30,20 +32,25 @@ namespace ZoFo.GameCore.GameManagers.CollisionManager
return false;
}
public void UpdateComponentCollision(List<CollisionComponent> collisionComponents)
{
}
public void UpdatePositions()
{
}
public void GetObjectInArea(Rectangle area)
{
//public void GetObjectInArea(Rectangle area)
//{
}
//}
public void Register(Rectangle rectangle)
{
//public void Register(Rectangle rectangle)
//{
}
//}
}