Currently, RogulikeComponent implements both IGameObjectComponent (via ComponentBase), and SadConsole.Components.IComponent. IComponent defines a SortOrder value, but GoRogue depends on GoRogue.Components.ISortedComponent for that, which ComponentBase does not implement; so the orders are not reflected in AllComponents.
Proposed Solution
ComponentBase and ComponentBase<T> should both implement GoRogue.Components.ISortedComponent, and their SortOrder property should be pointed at IComponent.SortOrder so they stay in sync. Unfortunately, this is currently difficult, because SadConsole's SortOrder is defined as an int, but GoRogue's is defined as a uint. SadConsole currently has plans to change to uint, so this will be easy to implement after that change.
Issue
Currently,
RogulikeComponent
implements bothIGameObjectComponent
(viaComponentBase
), andSadConsole.Components.IComponent
.IComponent
defines aSortOrder
value, but GoRogue depends onGoRogue.Components.ISortedComponent
for that, whichComponentBase
does not implement; so the orders are not reflected inAllComponents
.Proposed Solution
ComponentBase
andComponentBase<T>
should both implementGoRogue.Components.ISortedComponent
, and theirSortOrder
property should be pointed atIComponent.SortOrder
so they stay in sync. Unfortunately, this is currently difficult, because SadConsole'sSortOrder
is defined as anint
, butGoRogue's
is defined as auint
. SadConsole currently has plans to change touint
, so this will be easy to implement after that change.