Bricklayer.Client.World.Map.GetCollision C# (CSharp) Метод

GetCollision() публичный Метод

Gets the collision mode of the tile at a particular location. This method handles tiles outside of the levels boundries by making it impossible to escape past the MainCamera.btnLeft or MainCamera.btnRight edges, but allowing things to jump beyond the MainCamera.Top of the level and fall off the MainCamera.bottom.
public GetCollision ( int x, int y ) : BlockCollision
x int
y int
Результат BlockCollision
        public BlockCollision GetCollision(int x, int y)
        {
            // Prevent escaping past the level ends.
            if (y < 1 || y >= Height - 1 || x < 1 || x >= Width - 1)
                return BlockCollision.Impassable;
            return Tiles[x, y, 1].Block.Collision;
        }