private void CancelThisDeploy() { if (FollowIcon_) { Destroy(FollowIcon_.gameObject); FollowIcon_ = null; } Destroy(gameObject); DeployUnitDisplayHelper.Current = null; if (DeployUnitUIElement.CurrentFocus) { DeployUnitUIElement.CurrentFocus.FocusState = false; DeployUnitUIElement.CurrentFocus = null; } SampleNotePopWindow.Instance.ShowMessage(1001); }
/// <summary> /// 拖拽布阵方式下的拖拽结束时逻辑 /// </summary> public bool OnEndDragFromUI() { bool deploySucceed = false; //检查是否存在交叉 if (Intersecting_ > 0) { //当存在交叉时,取消这次非法布阵 CancelThisDeploy(); } else { //不存在交叉时 deploySucceed = true; Destroy(FollowIcon_.gameObject); FollowIcon_ = null; FollowIconShow_ = true; } State = DeployState.OnPlaced; return(deploySucceed); }