refactor!: IGameObject removed
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
namespace Syntriax.Engine.Core.Abstract;
|
||||
|
||||
/// <summary>
|
||||
/// Indicates the object is an <see cref="IAssignable"/> with an assignable <see cref="IGameObject"/> field.
|
||||
/// </summary>
|
||||
public interface IAssignableGameObject : IAssignable
|
||||
{
|
||||
/// <summary>
|
||||
/// Event triggered when the <see cref="IGameObject"/> value has has been assigned a new value.
|
||||
/// </summary>
|
||||
event OnGameObjectAssignedEventHandler? OnGameObjectAssigned;
|
||||
|
||||
/// <inheritdoc cref="IGameObject" />
|
||||
IGameObject GameObject { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Assign a value to the <see cref="IGameObject"/> field of this object.
|
||||
/// </summary>
|
||||
/// <param name="gameObject">New <see cref="IGameObject"/> to assign.</param>
|
||||
/// <returns>
|
||||
/// <see cref="true"/>, if the value given assigned successfully assigned, <see cref="false"/> if not.
|
||||
/// </returns>
|
||||
bool Assign(IGameObject gameObject);
|
||||
|
||||
delegate void OnGameObjectAssignedEventHandler(IAssignableGameObject sender);
|
||||
}
|
@@ -1,26 +0,0 @@
|
||||
namespace Syntriax.Engine.Core.Abstract;
|
||||
|
||||
/// <summary>
|
||||
/// Indicates the object is an <see cref="IAssignable"/> with an assignable <see cref="ITransform"/> field.
|
||||
/// </summary>
|
||||
public interface IAssignableTransform : IAssignable
|
||||
{
|
||||
/// <summary>
|
||||
/// Event triggered when the <see cref="ITransform"/> value has has been assigned a new value.
|
||||
/// </summary>
|
||||
event OnTransformAssignedEventHandler? OnTransformAssigned;
|
||||
|
||||
/// <inheritdoc cref="ITransform" />
|
||||
ITransform Transform { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Assign a value to the <see cref="ITransform"/> field of this object.
|
||||
/// </summary>
|
||||
/// <param name="transform">New <see cref="ITransform"/> to assign.</param>
|
||||
/// <returns>
|
||||
/// <see cref="true"/>, if the value given assigned successfully assigned, <see cref="false"/> if not.
|
||||
/// </returns>
|
||||
bool Assign(ITransform transform);
|
||||
|
||||
delegate void OnTransformAssignedEventHandler(IAssignableTransform sender);
|
||||
}
|
@@ -3,7 +3,7 @@ namespace Syntriax.Engine.Core.Abstract;
|
||||
/// <summary>
|
||||
/// Indicates the object is an <see cref="IAssignable"/> with an assignable <see cref="IBehaviourController"/> field.
|
||||
/// </summary>
|
||||
public interface IAssignableBehaviourController : IAssignable
|
||||
public interface IHasBehaviourController : IAssignable
|
||||
{
|
||||
/// <summary>
|
||||
/// Event triggered when the <see cref="IBehaviourController"/> value has has been assigned a new value.
|
||||
@@ -22,5 +22,5 @@ public interface IAssignableBehaviourController : IAssignable
|
||||
/// </returns>
|
||||
bool Assign(IBehaviourController behaviourController);
|
||||
|
||||
delegate void OnBehaviourControllerAssignedEventHandler(IAssignableBehaviourController sender);
|
||||
delegate void OnBehaviourControllerAssignedEventHandler(IHasBehaviourController sender);
|
||||
}
|
@@ -3,7 +3,7 @@ namespace Syntriax.Engine.Core.Abstract;
|
||||
/// <summary>
|
||||
/// Indicates the object is an <see cref="IAssignable"/> with an assignable <see cref="IEntity"/> field.
|
||||
/// </summary>
|
||||
public interface IAssignableEntity : IAssignable
|
||||
public interface IHasEntity : IAssignable
|
||||
{
|
||||
/// <summary>
|
||||
/// Event triggered when the <see cref="IEntity"/> value has has been assigned a new value.
|
||||
@@ -22,5 +22,5 @@ public interface IAssignableEntity : IAssignable
|
||||
/// </returns>
|
||||
bool Assign(IEntity entity);
|
||||
|
||||
delegate void OnEntityAssignedEventHandler(IAssignableEntity sender);
|
||||
delegate void OnEntityAssignedEventHandler(IHasEntity sender);
|
||||
}
|
@@ -1,9 +1,9 @@
|
||||
namespace Syntriax.Engine.Core.Abstract;
|
||||
|
||||
/// <summary>
|
||||
/// Indicates the object is an <see cref="IAssignable"/> with an assignable <see cref="ITransform"/> field.
|
||||
/// Indicates the object is an <see cref="IAssignable"/> with an assignable <see cref="ITransform2D"/> field.
|
||||
/// </summary>
|
||||
public interface IAssignableGameManager : IAssignable
|
||||
public interface IHasGameManager : IAssignable
|
||||
{
|
||||
/// <summary>
|
||||
/// Event triggered when the <see cref="IGameManager"/> value has has been assigned a new value.
|
||||
@@ -22,5 +22,5 @@ public interface IAssignableGameManager : IAssignable
|
||||
/// </returns>
|
||||
bool Assign(IGameManager gameManager);
|
||||
|
||||
delegate void OnGameManagerAssignedEventHandler(IAssignableGameManager sender);
|
||||
delegate void OnGameManagerAssignedEventHandler(IHasGameManager sender);
|
||||
}
|
26
Engine.Core/Abstract/Assignable/IHasHierarchyObject.cs
Normal file
26
Engine.Core/Abstract/Assignable/IHasHierarchyObject.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
namespace Syntriax.Engine.Core.Abstract;
|
||||
|
||||
/// <summary>
|
||||
/// Indicates the object is an <see cref="IAssignable"/> with an assignable <see cref="IHierarchyObject"/> field.
|
||||
/// </summary>
|
||||
public interface IHasHierarchyObject : IAssignable
|
||||
{
|
||||
/// <summary>
|
||||
/// Event triggered when the <see cref="IHierarchyObject"/> value has has been assigned a new value.
|
||||
/// </summary>
|
||||
event OnHierarchyObjectAssignedEventHandler? OnHierarchyObjectAssigned;
|
||||
|
||||
/// <inheritdoc cref="IHierarchyObject" />
|
||||
IHierarchyObject HierarchyObject { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Assign a value to the <see cref="IHierarchyObject"/> field of this object.
|
||||
/// </summary>
|
||||
/// <param name="hierarchyObject">New <see cref="IHierarchyObject"/> to assign.</param>
|
||||
/// <returns>
|
||||
/// <see cref="true"/>, if the value given assigned successfully assigned, <see cref="false"/> if not.
|
||||
/// </returns>
|
||||
bool Assign(IHierarchyObject hierarchyObject);
|
||||
|
||||
delegate void OnHierarchyObjectAssignedEventHandler(IHasHierarchyObject sender);
|
||||
}
|
@@ -3,7 +3,7 @@ namespace Syntriax.Engine.Core.Abstract;
|
||||
/// <summary>
|
||||
/// Indicates the object is an <see cref="IAssignable"/> with an assignable <see cref="IStateEnable"/> field.
|
||||
/// </summary>
|
||||
public interface IAssignableStateEnable : IAssignable
|
||||
public interface IHasStateEnable : IAssignable
|
||||
{
|
||||
/// <summary>
|
||||
/// Event triggered when the <see cref="IStateEnable"/> value has has been assigned a new value.
|
||||
@@ -22,5 +22,5 @@ public interface IAssignableStateEnable : IAssignable
|
||||
/// </returns>
|
||||
bool Assign(IStateEnable stateEnable);
|
||||
|
||||
delegate void OnStateEnableAssignedEventHandler(IAssignableStateEnable sender);
|
||||
delegate void OnStateEnableAssignedEventHandler(IHasStateEnable sender);
|
||||
}
|
@@ -1,64 +0,0 @@
|
||||
namespace Syntriax.Engine.Core.Abstract;
|
||||
|
||||
/// <summary>
|
||||
/// Represents an <see cref="IEntity"/> that can enter and exit a hierarchy within the <see cref="IGameManager"/> system.
|
||||
/// This interface allows for tracking the object's presence in the hierarchy and provides events
|
||||
/// for notifying when the see enters or exits the hierarchy.
|
||||
/// </summary>
|
||||
public interface IHierarchyObject : IEntity, INameable
|
||||
{
|
||||
/// <summary>
|
||||
/// Event triggered when the <see cref="IEntity"/> enters the hierarchy.
|
||||
/// </summary>
|
||||
event OnEnteredHierarchyEventHandler? OnEnteredHierarchy;
|
||||
|
||||
/// <summary>
|
||||
/// Event triggered when the <see cref="IEntity"/> exits the hierarchy.
|
||||
/// </summary>
|
||||
event OnExitedHierarchyEventHandler? OnExitedHierarchy;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="IGameManager"/> associated with this <see cref="IEntity"/> , if any.
|
||||
/// </summary>
|
||||
IGameManager GameManager { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether the <see cref="IEntity"/> is currently in the hierarchy.
|
||||
/// </summary>
|
||||
bool IsInHierarchy { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Internal method to handle entering the hierarchy.
|
||||
/// This should be called by the system to properly manage hierarchy states.
|
||||
/// </summary>
|
||||
/// <param name="gameManager">The game manager that is managing this hierarchy.</param>
|
||||
/// <returns>
|
||||
/// <see cref="true"/> if the <see cref="IEntity"/> successfully entered the hierarchy;
|
||||
/// <see cref="false"/> if it failed to do so.
|
||||
/// </returns>
|
||||
internal bool EnterHierarchy(IGameManager gameManager);
|
||||
|
||||
/// <summary>
|
||||
/// Internal method to handle exiting the hierarchy.
|
||||
/// This should be called by the system to properly manage hierarchy states.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// <see cref="true"/> if the <see cref="IEntity"/> successfully exited the hierarchy;
|
||||
/// <see cref="false"/> if it failed to do so.
|
||||
/// </returns>
|
||||
internal bool ExitHierarchy();
|
||||
|
||||
/// <summary>
|
||||
/// EventHandler delegate for the event triggered when the <see cref="IEntity"/> enters the hierarchy of a <see cref="IGameManager">.
|
||||
/// </summary>
|
||||
/// <param name="sender">The <see cref="IEntity"/> that entered the hierarchy.</param>
|
||||
/// <param name="gameManager">The <see cref="IGameManager"/> that the <see cref="IEntity"/> has entered it's hierarchy.</param>
|
||||
delegate void OnEnteredHierarchyEventHandler(IHierarchyObject sender, IGameManager gameManager);
|
||||
|
||||
/// <summary>
|
||||
/// EventHandler delegate for the event triggered when the <see cref="IEntity"/> exits the hierarchy of a <see cref="IGameManager">.
|
||||
/// </summary>
|
||||
/// <param name="sender">The <see cref="IEntity"/> that exited the hierarchy.</param>
|
||||
/// <param name="gameManager">The <see cref="IGameManager"/> that the <see cref="IEntity"/> has exited it's hierarchy.</param>
|
||||
delegate void OnExitedHierarchyEventHandler(IHierarchyObject sender, IGameManager gameManager);
|
||||
}
|
Reference in New Issue
Block a user