public void ParseOffsets(ObjectInstance instance, Board board, int x, int y) { bool ladder = l0 == "ladder"; if (footholdOffsets != null) { foreach (List <XNA.Point> anchorList in footholdOffsets) { List <FootholdAnchor> anchors = new List <FootholdAnchor>(); foreach (XNA.Point foothold in anchorList) { FootholdAnchor anchor = new FootholdAnchor(board, x + foothold.X, y + foothold.Y, instance.LayerNumber, instance.PlatformNumber, true); board.BoardItems.FHAnchors.Add(anchor); instance.BindItem(anchor, foothold); anchors.Add(anchor); } CreateFootholdsFromAnchorList(board, anchors); } } if (chairOffsets != null) { foreach (XNA.Point chairPos in chairOffsets) { Chair chair = new Chair(board, x + chairPos.X, y + chairPos.Y); board.BoardItems.Chairs.Add(chair); instance.BindItem(chair, chairPos); } } }