/// <summary> /// 设置参数(如传送门的传送点) /// </summary> void SetPara() { if (RoomMap.CheckRoomGridInBoat(m_roomGridTouchDown)) { TouchMove tm = TouchMoveManager.GetCurTouchMove(); if (tm) { Int2 paramPos = m_roomGridTouchDown.SoldierPos; CanvasCore buildRoomCoreTouchDown = m_roomGridTouchDown.GetBuildRoom(); tm.SetBuildParam(buildRoomCoreTouchDown, paramPos.Unit, paramPos.Layer); tm.SetBuildParaOver(); //传送门 这里没获取到 BuildProperty lifeobj = tm.GetComponent <BuildProperty>(); if (lifeobj != null && lifeobj.GetModeType() == 1605) { Building1605 b1605 = lifeobj.GetLife() as Building1605; if (b1605 != null) { b1605.SetTransGate(paramPos); } } } } else { NGUIUtil.ShowTipWndByKey("88800013"); } m_roomGridTouchDown = null; }
/// <summary> /// 检测传送门的传送点是否合法 /// </summary> /// <returns></returns> static bool CheckTransgatePoint(Int2 grid) { RoomGrid roomGrid = RoomMap.FindRoomGrid(grid, XYSYS.MapGrid); return(RoomMap.CheckRoomGridInBoat(roomGrid)); }