static void BindStair(Int2 grid) { CanvasCore core = RoomMap.FindCanvasCore(grid, ShipBuildType.BuildRoom); if (core != null) { TouchMove tm = PutCanvasM.GetTouchMoveByCore(core); tm.MoveWithRoom(core); } }
void OnMouseUp() { if (!m_bMouseDown || PutCanvasM.CanOperate == false) { return; } m_bMouseDown = false; bool bCancelSel = false; // MainCameraM.s_Instance.EnableDrag(true); TouchMove selNewTouchMov = null; if (TouchMove.g_bSetParaing == true) { SetPara(); return; } if (m_bTouchMoveChange) { if (m_roomGridTouchDown != null) { bCancelSel = true; selNewTouchMov = PutCanvasM.GetTouchMoveByRoomGrid(m_roomGridTouchDown, m_curClickType); if (null == selNewTouchMov) { CanvasCore buildRoomCoreTouchDown = m_roomGridTouchDown.GetBuildRoom(); selNewTouchMov = PutCanvasM.GetTouchMoveByCore(buildRoomCoreTouchDown); } if (selNewTouchMov) { CanvasCore selCanvasCore = selNewTouchMov.MyCore(); bCancelSel = false; TouchMove selOldeTouchMove = TouchMoveManager.GetCurTouchMove(); selNewTouchMov.PlayEditSelectAnimation();//点选时播放房间内陷阱动画 TouchMoveManager.SetCurTouchMove(selNewTouchMov); selNewTouchMov.MoveWithRoom(selCanvasCore); } if (bCancelSel) { TouchMoveManager.SetCurTouchMove(null); } } } else { selNewTouchMov = TouchMoveManager.GetCurTouchMove(); } if (selNewTouchMov) { if (selNewTouchMov.MoveBuildUp()) { //TouchMoveManager.ShowCanvas(false); PutCanvasM.ShowRoomGridUI(true); } else { PutCanvasM.ShowRoomGridUI(true); } } else { TouchMoveManager.SetCurTouchMove(null); //TouchMoveManager.ShowCanvas(false); PutCanvasM.ShowRoomGridUI(true); } }