Tile.UpdateBitmask C# (CSharp) 메소드

UpdateBitmask() 공개 메소드

public UpdateBitmask ( ) : void
리턴 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;
	}