protected override bool OnPrepare() { //墙体必须建在地基之上,且不能有其他建筑物 for (var i = 0; i < SelectedItems.Count; i++) { if (CheckAvailable(SelectedItems[i])) { RealSelectTileItems.Add(SelectedItems[i]); } } if (RealSelectTileItems.Count <= 0) { TipsManager.ShowTextTips("墙体必须建在地基之上,且不能有其他建筑物"); return(false); } return(true); }
protected override bool OnPrepare() { //选择可拆除的格子 for (var i = 0; i < SelectedItems.Count; i++) { if (CheckAvailable(SelectedItems[i])) { RealSelectTileItems.Add(SelectedItems[i]); } } if (RealSelectTileItems.Count <= 0) { TipsManager.ShowTextTips("没有可供拆除的墙体"); return(false); } return(true); }
protected override bool OnPrepare() { //门必须建在不带转角的墙壁上 //todo:建门只能单选 for (var i = 0; i < SelectedItems.Count; i++) { if (CheckAvailable(SelectedItems[i])) { RealSelectTileItems.Add(SelectedItems[i]); break; } } if (RealSelectTileItems.Count <= 0) { TipsManager.ShowTextTips("门必须建在不带转角的墙壁上"); return(false); } return(true); }