public Overlay CreateNewOverlay(int x, int y, eSlotAonTypeObj typeObj) { Overlay overlay = null; int idGen = -1; if (typeObj == eSlotAonTypeObj.House) { idGen = HouseData.Count; HouseData.Add(new House()); overlay = HouseData[idGen]; ComboBoxHelper.Instance.ResetTypeObj(eSlotAonTypeObj.House); } if (overlay != null) { // CheckInitArray(ref OverlayLink, TileMapWidth, TileMapHeight, -1); OverlayLink[x, y] = idGen; } return(overlay); }