Пример #1
0
        private static int GetHash(GridLayout gridLayout, GameObject brushTarget, BoundsInt position, GridBrushBase.Tool tool, GridBrush brush)
        {
            int num = 0;

            num = num * 33 + ((!(gridLayout != null)) ? 0 : gridLayout.GetHashCode());
            num = num * 33 + ((!(brushTarget != null)) ? 0 : brushTarget.GetHashCode());
            num = num * 33 + position.GetHashCode();
            num = num * 33 + tool.GetHashCode();
            return(num * 33 + ((!(brush != null)) ? 0 : brush.GetHashCode()));
        }
Пример #2
0
        private static int GetHash(GridLayout gridLayout, GameObject brushTarget, BoundsInt position, GridBrushBase.Tool tool, GridBrush brush)
        {
            int hash = 0;

            unchecked
            {
                hash = hash * 33 + (gridLayout != null ? gridLayout.GetHashCode() : 0);
                hash = hash * 33 + (brushTarget != null ? brushTarget.GetHashCode() : 0);
                hash = hash * 33 + position.GetHashCode();
                hash = hash * 33 + tool.GetHashCode();
                hash = hash * 33 + (brush != null ? brush.GetHashCode() : 0);
            }

            return(hash);
        }