Add attribute system with core stats and gameplay components

This commit is contained in:
2025-10-13 12:10:45 +02:00
commit ce3596efaa
55 changed files with 1161 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
namespace GameCore.ECS.Interfaces;
/// <summary>
/// A marker interface for all components.
/// Components are simple data containers (structs or classes) that hold the state
/// for a specific aspect of an Entity (e.g., its position, health, or inventory).
/// They contain no logic.
/// </summary>
public interface IComponent
{
}

View File

@@ -0,0 +1,6 @@
namespace GameCore.ECS.Interfaces;
public interface IEntityPresenter
{
public Entity CoreEntity { get; set; }
}

View File

@@ -0,0 +1,8 @@
namespace GameCore.ECS.Interfaces;
public interface IPresenterComponent
{
void Initialize(Entity coreEntity, World world);
void SyncToPresentation(float delta);
void SyncToCore(float delta);
}

View File

@@ -0,0 +1,17 @@
namespace GameCore.ECS.Interfaces;
/// <summary>
/// The contract for all game logic systems.
/// Systems are stateless classes that contain all the logic.
/// They operate on entities that possess a specific set of components.
/// For example, a MovementSystem would operate on entities with PositionComponent and VelocityComponent.
/// </summary>
public interface ISystem
{
/// <summary>
/// The main update method for a system, called once per game loop.
/// </summary>
/// <param name="world">A reference to the main World object to query for entities and components.</param>
/// <param name="deltaTime">The time elapsed since the last frame.</param>
void Update(World world, float deltaTime);
}

View File

@@ -0,0 +1,9 @@
using GameCore.Math;
namespace GameCore.ECS.Interfaces;
public interface IWorldQuery
{
HitResult Raycast(Vector3 from, Vector3 to, Entity? ownerToExclude = null);
Vector3 RotateVectorByYaw(Vector3 vector, float yawRadians);
}