25 lines
		
	
	
		
			816 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			816 B
		
	
	
	
		
			C#
		
	
	
	
	
	
namespace Engine.Core;
 | 
						|
 | 
						|
/// <summary>
 | 
						|
/// Indicates the object is an <see cref="IAssignable"/> with an assignable <see cref="IEntity"/> field.
 | 
						|
/// </summary>
 | 
						|
public interface IHasEntity : IAssignable
 | 
						|
{
 | 
						|
    /// <summary>
 | 
						|
    /// Event triggered when the <see cref="IEntity"/> value has has been assigned a new value.
 | 
						|
    /// </summary>
 | 
						|
    Event<IHasEntity> OnEntityAssigned { get; }
 | 
						|
 | 
						|
    /// <inheritdoc cref="IEntity" />
 | 
						|
    IEntity Entity { get; }
 | 
						|
 | 
						|
    /// <summary>
 | 
						|
    /// Assign a value to the <see cref="IEntity"/> field of this object.
 | 
						|
    /// </summary>
 | 
						|
    /// <param name="entity">New <see cref="IEntity"/> to assign.</param>
 | 
						|
    /// <returns> 
 | 
						|
    /// <see cref="true"/>, if the value given assigned successfully assigned, <see cref="false"/> if not.
 | 
						|
    /// </returns>
 | 
						|
    bool Assign(IEntity entity);
 | 
						|
}
 |