refactor: removed X.Abstract namespaces and moved StateMachine to under Systems namespace

This commit is contained in:
Syntriax 2025-04-15 23:33:58 +03:00
parent 94d01521d4
commit 8293c58f9f
79 changed files with 38 additions and 110 deletions

View File

@ -1,4 +1,4 @@
namespace Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
/// <summary>
/// Indicates the class implementing it has Assignable fields that are necessary for the engine to work properly.

View File

@ -1,4 +1,4 @@
namespace Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
/// <summary>
/// Indicates the object is an <see cref="IAssignable"/> with an assignable <see cref="IBehaviourController"/> field.

View File

@ -1,4 +1,4 @@
namespace Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
/// <summary>
/// Indicates the object is an <see cref="IAssignable"/> with an assignable <see cref="IEntity"/> field.

View File

@ -1,4 +1,4 @@
namespace Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
/// <summary>
/// Indicates the object is an <see cref="IAssignable"/> with an assignable <see cref="IStateEnable"/> field.

View File

@ -1,4 +1,4 @@
namespace Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
/// <summary>
/// Indicates the object is an <see cref="IAssignable"/> with an assignable <see cref="IUniverse"/> field.

View File

@ -1,4 +1,4 @@
namespace Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
/// <summary>
/// Indicates the object is an <see cref="IAssignable"/> with an assignable <see cref="IUniverseObject"/> field.

View File

@ -1,4 +1,4 @@
namespace Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
/// <summary>
/// Represents an entity which can be active or not.

View File

@ -1,4 +1,4 @@
namespace Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
/// <summary>
/// Represents a behaviour that any object in the engine that might use to interact with itself or other objects.

View File

@ -1,4 +1,4 @@
namespace Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
public interface IBehaviour2D : IBehaviour
{

View File

@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
/// <summary>
/// Represents a collector for the class type of <typeparamref name="T"/>.

View File

@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
/// <summary>
/// Represents a controller for managing <see cref="IBehaviour"/>s and notify them accordingly about the engine's updates. Connected to an <see cref="IUniverseObject"/>.

View File

@ -1,4 +1,4 @@
namespace Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
/// <summary>
/// Represents a 2D camera in the engine.

View File

@ -1,4 +1,4 @@
namespace Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
public interface ICoroutineYield
{

View File

@ -1,4 +1,4 @@
namespace Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
/// <summary>
/// Represents a basic entity in the engine.

View File

@ -1,4 +1,4 @@
namespace Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
/// <summary>
/// Represents an entity that can be initialized and finalized. This information is useful for objects we know that are not in use and can be either recycled or dropped for garbage collection.

View File

@ -1,4 +1,4 @@
namespace Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
/// <summary>
/// Represents an entity with a name.

View File

@ -1,4 +1,4 @@
namespace Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
/// <summary>
/// Represents an entity with an enable state that can be toggled.

View File

@ -1,4 +1,4 @@
namespace Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
/// <summary>
/// Represents the transformation properties of an object such as position, scale, and rotation in 2D space.

View File

@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
/// <summary>
/// Represents a universe responsible for managing <see cref="IUniverseObject"/>s.

View File

@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
/// <summary>
/// Represents an <see cref="IEntity"/> that can enter and exit a universe within the <see cref="IUniverse"/> system.

View File

@ -2,8 +2,6 @@ using System;
using System.Collections;
using System.Collections.Generic;
using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
public class ActiveBehaviourCollector<T> : IBehaviourCollector<T> where T : class, IBehaviour

View File

@ -1,7 +1,5 @@
using System;
using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
public class ActiveBehaviourCollectorSorted<T> : ActiveBehaviourCollector<T> where T : class, IBehaviour

View File

@ -1,6 +1,6 @@
using System;
namespace Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
public abstract class BaseEntity : IEntity
{

View File

@ -1,5 +1,3 @@
using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
public abstract class Behaviour : BehaviourBase

View File

@ -1,5 +1,3 @@
using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
public abstract class Behaviour2D : Behaviour, IBehaviour2D

View File

@ -1,5 +1,3 @@
using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
[System.Diagnostics.DebuggerDisplay("{GetType().Name, nq}, Priority: {Priority}, Initialized: {Initialized}")]

View File

@ -2,8 +2,6 @@ using System;
using System.Collections;
using System.Collections.Generic;
using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
public class BehaviourCollector<T> : IBehaviourCollector<T> where T : class

View File

@ -1,7 +1,5 @@
using System;
using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
public class BehaviourCollectorSorted<T> : BehaviourCollector<T> where T : class

View File

@ -3,8 +3,6 @@ using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
[System.Diagnostics.DebuggerDisplay("Behaviour Count: {behaviours.Count}")]

View File

@ -1,8 +1,6 @@
using System.Collections;
using System.Collections.Generic;
using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
public class CoroutineManager : UniverseObject

View File

@ -1,7 +1,5 @@
using System;
using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
public class CoroutineYield(Func<bool> condition) : ICoroutineYield

View File

@ -1,6 +1,5 @@
using System.Diagnostics.CodeAnalysis;
using Syntriax.Engine.Core.Abstract;
using Syntriax.Engine.Core.Exceptions;
namespace Syntriax.Engine.Core;

View File

@ -1,8 +1,6 @@
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
public static class BehaviourExtensions

View File

@ -1,5 +1,3 @@
using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
public static class TransformExtensions

View File

@ -1,4 +1,3 @@
using Syntriax.Engine.Core.Abstract;
using Syntriax.Engine.Core.Exceptions;
namespace Syntriax.Engine.Core;

View File

@ -1,8 +1,6 @@
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
public static class UniverseObjectExtensions

View File

@ -1,4 +1,3 @@
using Syntriax.Engine.Core.Abstract;
using Syntriax.Engine.Core.Exceptions;
namespace Syntriax.Engine.Core.Factory;

View File

@ -1,4 +1,3 @@
using Syntriax.Engine.Core.Abstract;
using Syntriax.Engine.Core.Exceptions;
namespace Syntriax.Engine.Core.Factory;

View File

@ -1,4 +1,3 @@
using Syntriax.Engine.Core.Abstract;
using Syntriax.Engine.Core.Exceptions;
namespace Syntriax.Engine.Core.Factory;

View File

@ -1,5 +1,3 @@
using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core.Factory;
public class TransformFactory

View File

@ -1,4 +1,3 @@
using Syntriax.Engine.Core.Abstract;
using Syntriax.Engine.Core.Exceptions;
namespace Syntriax.Engine.Core.Factory;

View File

@ -1,7 +1,5 @@
using System.Runtime.CompilerServices;
using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core.Debug;
public class AssertHelpers

View File

@ -1,7 +1,5 @@
using System.Diagnostics;
using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
/// <summary>

View File

@ -1,8 +1,6 @@
using System.Collections;
using System.Collections.Generic;
using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
/// <summary>

View File

@ -1,5 +1,4 @@
using System;
using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;

View File

@ -1,5 +1,3 @@
using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
public class StateEnable : IStateEnable

View File

@ -1,5 +1,3 @@
using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
[System.Diagnostics.DebuggerDisplay("Name: {UniverseObject.Name, nq} Position: {Position.ToString(), nq}, Scale: {Scale.ToString(), nq}, Rotation: {Rotation}")]

View File

@ -2,8 +2,6 @@ using System;
using System.Collections;
using System.Collections.Generic;
using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
[System.Diagnostics.DebuggerDisplay("UniverseObject Count: {_universeObjects.Count}")]

View File

@ -1,8 +1,6 @@
using System.Collections;
using System.Collections.Generic;
using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Core;
[System.Diagnostics.DebuggerDisplay("Name: {Name}, Initialized: {Initialized}")]

View File

@ -1,6 +1,6 @@
using Syntriax.Engine.Core;
namespace Syntriax.Engine.Physics2D.Abstract;
namespace Syntriax.Engine.Physics2D;
/// <summary>
/// Represents a <see cref="ICollider2D"/> with the shape of a <see cref="Circle"/>.

View File

@ -1,6 +1,6 @@
using Syntriax.Engine.Core.Abstract;
using Syntriax.Engine.Core;
namespace Syntriax.Engine.Physics2D.Abstract;
namespace Syntriax.Engine.Physics2D;
/// <summary>
/// Represents a 2D collider.

View File

@ -1,5 +1,3 @@
using Syntriax.Engine.Physics2D.Abstract;
namespace Syntriax.Engine.Physics2D;
/// <summary>

View File

@ -1,4 +1,4 @@
namespace Syntriax.Engine.Physics2D.Abstract;
namespace Syntriax.Engine.Physics2D;
/// <summary>
/// Represents a 2D collision resolver.

View File

@ -1,4 +1,4 @@
namespace Syntriax.Engine.Physics2D.Abstract;
namespace Syntriax.Engine.Physics2D;
/// <summary>
/// Represents a 2D physics engine.

View File

@ -1,4 +1,4 @@
namespace Syntriax.Engine.Physics2D.Abstract;
namespace Syntriax.Engine.Physics2D;
/// <summary>
/// Represents a 2D physics object's responsive attributes.

View File

@ -1,6 +1,6 @@
using Syntriax.Engine.Core.Abstract;
using Syntriax.Engine.Core;
namespace Syntriax.Engine.Physics2D.Abstract;
namespace Syntriax.Engine.Physics2D;
/// <summary>
/// Represents a <see cref="IBehaviour"/> that listens to physics simulation update phase.

View File

@ -1,7 +1,6 @@
using Syntriax.Engine.Core;
using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Physics2D.Abstract;
namespace Syntriax.Engine.Physics2D;
/// <summary>
/// Represents a 2D rigid body in the engine.

View File

@ -1,6 +1,6 @@
using Syntriax.Engine.Core;
namespace Syntriax.Engine.Physics2D.Abstract;
namespace Syntriax.Engine.Physics2D;
/// <summary>
/// Represents a <see cref="ICollider2D"/> with a custom <see cref="Shape2D"/>.

View File

@ -1,6 +1,4 @@
using Syntriax.Engine.Core;
using Syntriax.Engine.Core.Abstract;
using Syntriax.Engine.Physics2D.Abstract;
namespace Syntriax.Engine.Physics2D;

View File

@ -1,5 +1,4 @@
using Syntriax.Engine.Core;
using Syntriax.Engine.Physics2D.Abstract;
namespace Syntriax.Engine.Physics2D;

View File

@ -1,5 +1,4 @@
using Syntriax.Engine.Core;
using Syntriax.Engine.Physics2D.Abstract;
namespace Syntriax.Engine.Physics2D;

View File

@ -1,5 +1,4 @@
using Syntriax.Engine.Core;
using Syntriax.Engine.Physics2D.Abstract;
namespace Syntriax.Engine.Physics2D;

View File

@ -1,5 +1,5 @@
using Syntriax.Engine.Core;
using Syntriax.Engine.Physics2D.Abstract;
using Syntriax.Engine.Physics2D;
namespace Syntriax.Engine.Physics2D;

View File

@ -1,5 +1,4 @@
using Syntriax.Engine.Core;
using Syntriax.Engine.Physics2D.Abstract;
namespace Syntriax.Engine.Physics2D;

View File

@ -2,8 +2,6 @@ using System.Collections;
using System.Collections.Generic;
using Syntriax.Engine.Core;
using Syntriax.Engine.Core.Abstract;
using Syntriax.Engine.Physics2D.Abstract;
namespace Syntriax.Engine.Physics2D;

View File

@ -1,6 +1,4 @@
using Syntriax.Engine.Core;
using Syntriax.Engine.Core.Abstract;
using Syntriax.Engine.Physics2D.Abstract;
namespace Syntriax.Engine.Physics2D;

View File

@ -1,8 +1,6 @@
using System.Collections.Generic;
using Syntriax.Engine.Core;
using Syntriax.Engine.Core.Abstract;
using Syntriax.Engine.Physics2D.Abstract;
namespace Syntriax.Engine.Physics2D;

View File

@ -1,5 +1,3 @@
using Syntriax.Engine.Physics2D.Abstract;
namespace Syntriax.Engine.Physics2D;
public readonly struct PhysicsMaterial2D(float Friction, float Restitution) : IPhysicsMaterial2D

View File

@ -1,5 +1,3 @@
using Syntriax.Engine.Physics2D.Abstract;
namespace Syntriax.Engine.Physics2D;
public readonly struct PhysicsMaterial2DDefault : IPhysicsMaterial2D

View File

@ -1,5 +1,4 @@
using Syntriax.Engine.Core;
using Syntriax.Engine.Physics2D.Abstract;
namespace Syntriax.Engine.Physics2D;

View File

@ -1,4 +1,4 @@
using Syntriax.Engine.Core.Abstract;
using Syntriax.Engine.Core;
namespace Syntriax.Engine.Systems.Input;

View File

@ -1,4 +1,4 @@
namespace Syntriax.Engine.StateMachine;
namespace Syntriax.Engine.Systems.StateMachine;
public interface IState
{

View File

@ -1,6 +1,6 @@
using Syntriax.Engine.Core;
namespace Syntriax.Engine.StateMachine;
namespace Syntriax.Engine.Systems.StateMachine;
public class State : IState
{

View File

@ -1,6 +1,6 @@
using Syntriax.Engine.Core;
namespace Syntriax.Engine.StateMachine;
namespace Syntriax.Engine.Systems.StateMachine;
public abstract class StateBehaviourBase : Behaviour, IState
{

View File

@ -1,6 +1,6 @@
using Syntriax.Engine.Core;
namespace Syntriax.Engine.StateMachine;
namespace Syntriax.Engine.Systems.StateMachine;
public class StateMachine : Behaviour
{

View File

@ -1,4 +1,4 @@
namespace Syntriax.Engine.StateMachine;
namespace Syntriax.Engine.Systems.StateMachine;
public readonly record struct StateTransition(IState State, IReadOnlyList<Func<bool>> Conditions)
{

View File

@ -1,5 +1,4 @@
using Syntriax.Engine.Core;
using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Systems.Time;

View File

@ -1,5 +1,4 @@
using Syntriax.Engine.Core;
using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Systems.Time;

View File

@ -1,7 +1,6 @@
using System.Collections;
using Syntriax.Engine.Core;
using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Systems.Tween;