mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-07 02:08:17 +02:00
* Added new ComponentEventBus, combined it with IEventBus. * Removed all traces of IEntity from ComponentDependencies. Removed IEntityManager dependency from ComponentManager. * Added entity create/delete events to IEntityManager. * ComponentEvents now use EntitySystemMessages instead of their custom ComponentEvent class. * Component events are now just overloads of entity events. * Removed obsolete EntitySystemMessage, now everything uses the base EntityEventArgs. * Add a bool argument for if the message should be broadcast as well as directed. Fix ordering and init issues of events in EntityManager. * Changed names from Component/Entity events to Directed/Broadcast. * Fix bugs and unit tests.
30 lines
905 B
C#
30 lines
905 B
C#
namespace Robust.Shared.GameObjects
|
|
{
|
|
/// <summary>
|
|
/// Raised when an entity parent is changed.
|
|
/// </summary>
|
|
public class EntParentChangedMessage : EntityEventArgs
|
|
{
|
|
/// <summary>
|
|
/// Entity that was adopted. The transform component has a property with the new parent.
|
|
/// </summary>
|
|
public IEntity Entity { get; }
|
|
|
|
/// <summary>
|
|
/// Old parent that abandoned the Entity.
|
|
/// </summary>
|
|
public IEntity? OldParent { get; }
|
|
|
|
/// <summary>
|
|
/// Creates a new instance of <see cref="EntParentChangedMessage"/>.
|
|
/// </summary>
|
|
/// <param name="entity"></param>
|
|
/// <param name="oldParent"></param>
|
|
public EntParentChangedMessage(IEntity entity, IEntity? oldParent)
|
|
{
|
|
Entity = entity;
|
|
OldParent = oldParent;
|
|
}
|
|
}
|
|
}
|