Click or drag to resize
SpriteControllerSpriteComparisonDelegate Field
Allow the sprite sort-method to be overridden.

Namespace:  SpriteLibrary
Assembly:  SpriteLibrary (in SpriteLibrary.dll) Version: 1.0.0.5 (1.0.0.5)
Syntax
C#
public Comparison<Sprite> SpriteComparisonDelegate

Field Value

Type: ComparisonSprite
Examples
The default sprite sort method is:
C#
SpriteComparisonDelegate = delegate (Sprite first, Sprite second) { return first.Zvalue.CompareTo(second.Zvalue); };
Which compares just the Zvalues of the two sprites. Often you will want to have a more refined sort. The sort order determines which sprites appear on top of other sprites. In the default state, if two sprites have the same Zvalue, it is very uncleaer which one will draw on top of the other one. By overridding this sort function, you can specify a very precise order of which sprite is on top and which is behind.
See Also