Interface ISortedComponent
Optional interface that may be implemented by components to ensure they are returned in a specific order when GetComponent<T>() is called. Components are not required to implement this interface, however components that do not will be returned after any components that do.
Namespace: GoRogue
Assembly: GoRogue.dll
Syntax
public interface ISortedComponent
Remarks
When the GetComponents function of either ComponentContainer or any object that uses one to implement the component system (such as IGameObject is called, any components with a lower SortOrder are guaranteed to be returned BEFORE any components with a higher SortOrder. This can be useful to enforce that certain types of or instances of components are processed before some other type of or instance of components. Components that do not implement ISortedComponent will always be retorned AFTER any components that do implement that interface.
Properties
| Improve this Doc View SourceSortOrder
Value indicating the relative ordering of this component. A lower value cause a component to be retrieved before any components with a higher value.
Declaration
uint SortOrder { get; }
Property Value
Type | Description |
---|---|
System.UInt32 |