mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
32 lines
977 B
C#
32 lines
977 B
C#
using Robust.Shared.Interfaces.GameObjects;
|
|
|
|
namespace Robust.Shared.GameObjects.EntitySystemMessages
|
|
{
|
|
/// <summary>
|
|
/// Raised when an entity parent is changed.
|
|
/// </summary>
|
|
public class EntParentChangedMessage : EntitySystemMessage
|
|
{
|
|
/// <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;
|
|
}
|
|
}
|
|
}
|