SadConsole.Game.WorldGeneration.Tile.UpdateBitmask C# (CSharp) Method

UpdateBitmask() public method

public UpdateBitmask ( ) : void
return void
        public void UpdateBitmask()
        {
            int count = 0;

            if (Collidable && Top != null && Top.HeightType == HeightType)
                count += 1;
            if (Collidable && Right != null && Right.HeightType == HeightType)
                count += 2;
            if (Collidable && Bottom != null && Bottom.HeightType == HeightType)
                count += 4;
            if (Collidable && Left != null && Left.HeightType == HeightType)
                count += 8;

            Bitmask = count;
        }