Ejemplo n.º 1
0
    public int CompareTo(SpriteKey other)
    {
        var samplerComparison = Sampler.CompareTo(other.Sampler);

        if (samplerComparison != 0)
        {
            return(samplerComparison);
        }
        var orderComparison = RenderOrder.CompareTo(other.RenderOrder);

        if (orderComparison != 0)
        {
            return(orderComparison);
        }
        var flagsComparison = Flags.CompareTo(other.Flags);

        if (flagsComparison != 0)
        {
            return(flagsComparison);
        }
        return(Nullable.Compare(ScissorRegion, other.ScissorRegion));
    }