void GenTex2D() { tex = new Texture2D(rtSize.x, rtSize.y, format, flags); var texMapSize = texMap.Size(); viewScale = Mathf.Max(0.4f, viewScale); var sampleSize = rtSize.Mul(1f / viewScale); viewMapOs = VectorTool.Clamp(viewMapOs, Vector2Int.zero, texMapSize - sampleSize); var pixels = texMap.GetPixels(viewMapOs, sampleSize); // resample for (int y = 0; y < rtSize.y; y++) { for (int x = 0; x < rtSize.x; x++) { var ny = y / (float)(rtSize.y - 1); var nx = x / (float)(rtSize.x - 1); var i = Mathf.RoundToInt(ny * (sampleSize.y - 1)) * sampleSize.x + Mathf.RoundToInt(nx * (sampleSize.x - 1)); buffer[y * rtSize.x + x] = pixels[i]; } } tex.SetPixels(Vector2Int.zero, rtSize, buffer); tex.MaskCorner(UI.I.texWindow[0], UI.I.corSizeWindow); tex.Apply(false); }
//运动到某个位置 public void gotoPos(Vector3 position) { position.y = transform.localPosition.y; if (!VectorTool.IsCloseEnough(position, transform.localPosition, carMessage.speed)) { //判断车在直线还是曲线 if (carMessage.carEdge.lineType.Equals(LineType.Curve)) { //旋转运动 MyRotateAround(carMessage.carEdge.curveCenter, new Vector3(0, 1, 0), carMessage.speed * Time.deltaTime); carMessage.carPos = transform.localPosition; } else if (carMessage.carEdge.lineType.Equals(LineType.Straight)) { //直线运动 transform.localPosition = Vector3.MoveTowards(transform.localPosition, position, carMessage.speed * Time.deltaTime); carMessage.carPos = transform.localPosition; } else { } } else//已经到达该点 { transform.localPosition = position; carMessage.carPos = transform.localPosition; return; } }
void Go() { InitMap(); InitGraph(); PrintMap("Map"); PrintGraph(); var min = Vector2Int.zero; var max = size - Vector2Int.one; src = VectorTool.Clamp(src, min, max); dst = VectorTool.Clamp(dst, min, max); shortestep = PrintShortest(); if (shortestep > 0) { PrintMap("Path(Steps " + shortestep + ")"); PrintDepth(); ClearMap(); // 用宽度优先搜索验证 //print("BFSearch: " + BFSearch()); BFSearch(); PrintDepth(); Debug.Log((shortestep == close[dst.y, dst.x].G) ? "正确" : "错误"); } else { Debug.Log("不可到达"); } }
//运动到某个位置 public void gotoPos(Vector3 position) { position.y = carMessage.carPos.y; if (!VectorTool.IsCloseEnough(position, carMessage.carPos, carMessage.speed)) { //判断车在直线还是曲线 if (carMessage.carEdge.lineType.Equals(LineType.Curve)) { //模拟旋转运动 SimuRotateAround(curveRadius, carMessage.carEdge.curveCenter, carMessage.speed * GlobalVaribles.frameTime); } else if (carMessage.carEdge.lineType.Equals(LineType.Straight)) { //模拟直线运动 SimuMoveTowards(position, carMessage.speed * GlobalVaribles.frameTime); } else { } } else//说明已经到达该点 { carMessage.carPos = position; //退出该方法 return; } }
/// <summary> /// 返回下一步要前进的方向,-1表示左转 0表示直行 1表示右转,2表示掉头 /// </summary> /// <param name="re">当前车辆所在的道路</param> /// <returns></returns> internal int GetDirection(Way re) { Way reNext = base.FindNext(re); if (reNext == null)//如果到达路径的终点就直行 { return(0); } return(VectorTool.GetVectorPos(re.ToVector(), reNext.ToVector())); }
//模拟小车的直线运动 public void SimuMoveTowards(Vector3 endPos, float speed) { if (VectorTool.IsCloseEnough(carMessage.carPos, endPos, carMessage.speed)) { carMessage.carPos = endPos; return; } Vector3 moveVector3 = VectorTool.vectorSub(endPos, carMessage.carPos).normalized *speed; carMessage.carPos += moveVector3; }
/// <summary> /// 用图形界面坐标系,转化为元胞坐标系,create a shape of a lane /// </summary> /// <param name="eShape"></param> internal void CreateShape() { EntityShape prant = this.Container.Shape; var pNorm = VectorTool.GetNormal(this.Container.ToVector()); foreach (var point in prant) { int iScaler = this.Rank; var newPoint = Coordinates.Offset(point, OxyzPointF.Muilt(pNorm, iScaler)); this.Shape.Add(newPoint); } }
/// <summary> /// move shape by "scaler" steps with its normal vector /// </summary> /// <param name="iScaler"></param> public void Offset(int iScaler) { Point vector = VectorTool.GetNormal(this.Start, this.End); double dWidth = iScaler; Point temp = new Point(); for (int i = 0; i < this.Count; i++) { temp = this[i]; //value copy Coordinates.Offset(ref temp, iScaler, vector); //ref copy this[i] = temp; } }
//运动到某个点 public void gotoVertex(TrailerGraph.Vertex vertex) { Vector3 vPos1 = vertex.vertexPos; vPos1.y = transform.localPosition.y; if (!VectorTool.IsCloseEnough(vPos1, transform.localPosition, carMessage.speed)) { //判断车在直线还是曲线 if (carMessage.carEdge.lineType.Equals(LineType.Curve))//曲线 { //旋转运动 MyRotateAround(carMessage.carEdge.curveCenter, new Vector3(0, 1, 0), carMessage.speed * Time.deltaTime); carMessage.carPos = transform.localPosition; } else if (carMessage.carEdge.lineType.Equals(LineType.Straight)) { //直线运动 transform.localPosition = Vector3.MoveTowards(transform.localPosition, vPos1, carMessage.speed * Time.deltaTime); carMessage.carPos = transform.localPosition; } else { } } else//已经到达该点 { transform.localPosition = vPos1; carMessage.carPos = transform.localPosition; carPathData = GlobalVaribles.trailerGraph.pathMap[vertex.index, carPathData.pathList[carPathData.pathList.Count - 1].index]; if (carMessage.workState == WorkState.WayToLoad && vertex.index == task.loadGoods_Edge.vertexNum1) { carMessage.carEdge = GlobalVaribles.trailerGraph.adjMatrix[vertex.index, task.loadGoods_Edge.vertexNum2]; } else if (carMessage.workState == WorkState.WayToUnload && vertex.index == task.unloadGoods_Edge.vertexNum1) { carMessage.carEdge = GlobalVaribles.trailerGraph.adjMatrix[vertex.index, task.unloadGoods_Edge.vertexNum2]; } else { carMessage.carEdge = GlobalVaribles.trailerGraph.adjMatrix[carPathData.pathList[0].index, carPathData.pathList[1].index]; } //进入新的曲线, 更新angled carMessage.angled = carMessage.carEdge.startDeg; //旋转值的修正 Vector3 rotation = transform.localEulerAngles; rotation.y = carMessage.carEdge.endDeg; transform.localEulerAngles = rotation; return; } }
//运动到某个点 public void gotoVertex(TrailerGraph.Vertex vertex) { Vector3 vPos1 = vertex.vertexPos; vPos1.y = carMessage.carPos.y; if (!VectorTool.IsCloseEnough(vPos1, carMessage.carPos, carMessage.speed)) { //判断车在直线还是曲线 if (carMessage.carEdge.lineType.Equals(LineType.Curve))//曲线 { //模拟旋转运动 SimuRotateAround(curveRadius, carMessage.carEdge.curveCenter, carMessage.speed * GlobalVaribles.frameTime); } else if (carMessage.carEdge.lineType.Equals(LineType.Straight)) { //模拟直线运动 SimuMoveTowards(vPos1, carMessage.speed * GlobalVaribles.frameTime); } else { } } else//已经到达该点 { carMessage.carPos = vPos1; carPathData = GlobalVaribles.trailerGraph.pathMap[vertex.index, carPathData.pathList[carPathData.pathList.Count - 1].index]; if (carMessage.workState == WorkState.WayToLoad && vertex.index == task.loadGoods_Edge.vertexNum1) { carMessage.carEdge = GlobalVaribles.trailerGraph.adjMatrix[vertex.index, task.loadGoods_Edge.vertexNum2]; } else if (carMessage.workState == WorkState.WayToUnload && vertex.index == task.unloadGoods_Edge.vertexNum1) { carMessage.carEdge = GlobalVaribles.trailerGraph.adjMatrix[vertex.index, task.unloadGoods_Edge.vertexNum2]; } else { carMessage.carEdge = GlobalVaribles.trailerGraph.adjMatrix[carPathData.pathList[0].index, carPathData.pathList[1].index]; } carMessage.angled = carMessage.carEdge.startDeg; return; } }
internal float[] FppCamera(Game game) { Vector3Ref forward = new Vector3Ref(); VectorTool.ToVectorInFixedSystem(0, 0, 1, game.player.position.rotx, game.player.position.roty, forward); Vector3Ref cameraEye = new Vector3Ref(); Vector3Ref cameraTarget = new Vector3Ref(); float playerEyeX = game.player.position.x; float playerEyeY = game.player.position.y + game.GetCharacterEyesHeight(); float playerEyeZ = game.player.position.z; if (!game.ENABLE_TPP_VIEW) { cameraEye.X = playerEyeX; cameraEye.Y = playerEyeY; cameraEye.Z = playerEyeZ; cameraTarget.X = playerEyeX + forward.X; cameraTarget.Y = playerEyeY + forward.Y; cameraTarget.Z = playerEyeZ + forward.Z; } else { cameraEye.X = playerEyeX + forward.X * -game.tppcameradistance; cameraEye.Y = playerEyeY + forward.Y * -game.tppcameradistance; cameraEye.Z = playerEyeZ + forward.Z * -game.tppcameradistance; cameraTarget.X = playerEyeX; cameraTarget.Y = playerEyeY; cameraTarget.Z = playerEyeZ; FloatRef currentTppcameradistance = FloatRef.Create(game.tppcameradistance); LimitThirdPersonCameraToWalls(game, cameraEye, cameraTarget, currentTppcameradistance); } float[] ret = new float[16]; Mat4.LookAt(ret, Vec3.FromValues(cameraEye.X, cameraEye.Y, cameraEye.Z), Vec3.FromValues(cameraTarget.X, cameraTarget.Y, cameraTarget.Z), upVec3); game.CameraEyeX = cameraEye.X; game.CameraEyeY = cameraEye.Y; game.CameraEyeZ = cameraEye.Z; return(ret); }
void AddMeshColliderToChildren() { var rdrs = GetComponentsInChildren <Renderer>(); Mesh mesh = null; foreach (var rdr in rdrs) { if (!rdr.enabled) { continue; } var mf = rdr.GetComponent <MeshFilter>(); if (mf != null) { mesh = mf.sharedMesh; } else { var smr = rdr as SkinnedMeshRenderer; if (smr != null) { smr.BakeMesh(mesh); var vs = mesh.vertices; var list = new List <Vector3>(); foreach (var v in vs) { //list.Add(rdr.transform.InverseTransformPoint(v)); var s = VectorTool.Divide(Vector3.one, rdr.transform.localScale); list.Add(Vector3.Scale(s, v)); } mesh.vertices = list.ToArray(); } } var mc = rdr.GetComOrAdd <MeshCollider>(); mc.sharedMesh = mesh; //mc.convex = true; } }
public void Update(EntityPosition_ stateplayerposition, Controls move, float dt, BoolRef soundnow, Vector3Ref push, float modelheight) { if (game.stopPlayerMove) { movedz = 0; game.stopPlayerMove = false; } // No air control if (!isplayeronground) { acceleration.acceleration1 = 0.99f; acceleration.acceleration2 = 0.2f; acceleration.acceleration3 = 70; } // Trampoline { int blockunderplayer = game.BlockUnderPlayer(); if (blockunderplayer != -1 && blockunderplayer == game.d_Data.BlockIdTrampoline() && (!isplayeronground) && !game.controls.shiftkeydown) { game.controls.wantsjump = true; jumpstartacceleration = 20.666f * constGravity; } } // Slippery walk on ice and when swimming { int blockunderplayer = game.BlockUnderPlayer(); if ((blockunderplayer != -1 && game.d_Data.IsSlipperyWalk()[blockunderplayer]) || game.SwimmingBody()) { acceleration.acceleration1 = 0.99f; acceleration.acceleration2 = 0.2f; acceleration.acceleration3 = 70; } } soundnow.value = false; Vector3Ref diff1ref = new Vector3Ref(); VectorTool.ToVectorInFixedSystem (move.movedx * movespeednow * dt, 0, move.movedy * movespeednow * dt, stateplayerposition.rotx, stateplayerposition.roty, diff1ref); Vector3Ref diff1 = new Vector3Ref(); diff1.X = diff1ref.X; diff1.Y = diff1ref.Y; diff1.Z = diff1ref.Z; if (MiscCi.Vec3Length(push.X, push.Y, push.Z) > 0.01f) { push.Normalize(); push.X *= 5; push.Y *= 5; push.Z *= 5; } diff1.X += push.X * dt; diff1.Y += push.Y * dt; diff1.Z += push.Z * dt; bool loaded = false; int cx = game.platform.FloatToInt(game.player.position.x / Game.chunksize); int cy = game.platform.FloatToInt(game.player.position.z / Game.chunksize); int cz = game.platform.FloatToInt(game.player.position.y / Game.chunksize); if (game.map.IsValidChunkPos(cx, cy, cz)) { if (game.map.chunks[MapUtilCi.Index3d(cx, cy, cz, game.map.MapSizeX / Game.chunksize, game.map.MapSizeY / Game.chunksize)] != null) { loaded = true; } } else { loaded = true; } if ((!(move.freemove)) && loaded) { if (!game.SwimmingBody()) { movedz += -constGravity;//gravity } else { movedz += -constGravity * constWaterGravityMultiplier; //more gravity because it's slippery. } } game.movedz = movedz; if (constEnableAcceleration) { curspeed.X *= acceleration.acceleration1; curspeed.Y *= acceleration.acceleration1; curspeed.Z *= acceleration.acceleration1; curspeed.X = MakeCloserToZero(curspeed.X, acceleration.acceleration2 * dt); curspeed.Y = MakeCloserToZero(curspeed.Y, acceleration.acceleration2 * dt); curspeed.Z = MakeCloserToZero(curspeed.Z, acceleration.acceleration2 * dt); diff1.Y += move.moveup ? 2 * movespeednow * dt : 0; diff1.Y -= move.movedown ? 2 * movespeednow * dt : 0; curspeed.X += diff1.X * acceleration.acceleration3 * dt; curspeed.Y += diff1.Y * acceleration.acceleration3 * dt; curspeed.Z += diff1.Z * acceleration.acceleration3 * dt; if (curspeed.Length() > movespeednow) { curspeed.Normalize(); curspeed.X *= movespeednow; curspeed.Y *= movespeednow; curspeed.Z *= movespeednow; } } else { if (MiscCi.Vec3Length(diff1.X, diff1.Y, diff1.Z) > 0) { diff1.Normalize(); } curspeed.X = diff1.X * movespeednow; curspeed.Y = diff1.Y * movespeednow; curspeed.Z = diff1.Z * movespeednow; } Vector3Ref newposition = Vector3Ref.Create(0, 0, 0); if (!(move.freemove)) { newposition.X = stateplayerposition.x + curspeed.X; newposition.Y = stateplayerposition.y + curspeed.Y; newposition.Z = stateplayerposition.z + curspeed.Z; if (!game.SwimmingBody()) { newposition.Y = stateplayerposition.y; } // Fast move when looking at the ground float diffx = newposition.X - stateplayerposition.x; float diffy = newposition.Y - stateplayerposition.y; float diffz = newposition.Z - stateplayerposition.z; float difflength = MiscCi.Vec3Length(diffx, diffy, diffz); if (difflength > 0) { diffx /= difflength; diffy /= difflength; diffz /= difflength; diffx *= curspeed.Length(); diffy *= curspeed.Length(); diffz *= curspeed.Length(); } newposition.X = stateplayerposition.x + diffx * dt; newposition.Y = stateplayerposition.y + diffy * dt; newposition.Z = stateplayerposition.z + diffz * dt; } else { newposition.X = stateplayerposition.x + (curspeed.X) * dt; newposition.Y = stateplayerposition.y + (curspeed.Y) * dt; newposition.Z = stateplayerposition.z + (curspeed.Z) * dt; } newposition.Y += movedz * dt; Vector3Ref previousposition = Vector3Ref.Create(stateplayerposition.x, stateplayerposition.y, stateplayerposition.z); if (!move.noclip) { float[] v = WallSlide( Vec3.FromValues(stateplayerposition.x, stateplayerposition.y, stateplayerposition.z), Vec3.FromValues(newposition.X, newposition.Y, newposition.Z), modelheight); stateplayerposition.x = v[0]; stateplayerposition.y = v[1]; stateplayerposition.z = v[2]; } else { stateplayerposition.x = newposition.X; stateplayerposition.y = newposition.Y; stateplayerposition.z = newposition.Z; } if (!(move.freemove)) { if ((isplayeronground) || game.SwimmingBody()) { jumpacceleration = 0; movedz = 0; } if ((move.wantsjump || move.wantsjumphalf) && (((jumpacceleration == 0 && isplayeronground) || game.SwimmingBody()) && loaded) && (!game.SwimmingEyes())) { jumpacceleration = move.wantsjumphalf ? jumpstartaccelerationhalf : jumpstartacceleration; soundnow.value = true; } if (jumpacceleration > 0) { isplayeronground = false; jumpacceleration = jumpacceleration / 2; } //if (!this.reachedceiling) { movedz += jumpacceleration * constJump; } } else { isplayeronground = true; } game.isplayeronground = isplayeronground; }
private void RenderLocation() { int gridsize = mapeditor.opt_grid; hoverLoc.Clear(); lastsize = long.MaxValue; _spriteBatch.Begin(blendState: BlendState.NonPremultiplied); temp_dragscreenstartPos = mapeditor.PosMapToScreen(mouse_DragMapStart); temp_dragscreenendPos = MousePos; temp_dragmapgab = mapeditor.PosScreenToMap(MousePos) - mouse_DragMapStart; if (gridsize != 0) { temp_dragmapgab = new Vector2((float)(Math.Round(temp_dragmapgab.X / gridsize) * gridsize), (float)(Math.Round(temp_dragmapgab.Y / gridsize) * gridsize)); } temp_dragmapmin = new Vector2(Math.Min(temp_dragscreenstartPos.X, temp_dragscreenendPos.X), Math.Min(temp_dragscreenstartPos.Y, temp_dragscreenendPos.Y)); temp_dragmapmax = new Vector2(Math.Max(temp_dragscreenstartPos.X, temp_dragscreenendPos.X), Math.Max(temp_dragscreenstartPos.Y, temp_dragscreenendPos.Y)); for (int i = 1; i < mapeditor.mapdata.LocationDatas.Count; i++) { DrawLocation(mapeditor.mapdata.LocationDatas[i]); } if (mapeditor.PalleteLayer == Control.MapEditor.Layer.Location) { if (locIsmulitSelect) { for (int i = 0; i < hoverLoc.Count; i++) { DrawLocation(hoverLoc[i]); } } else { if (hoverLoc.Count > 0) { DrawLocation(hoverLoc.First()); } } if (mouse_IsDrag) { if (locIsmulitSelect) { //선택 Vector2 min = new Vector2(Math.Min(temp_dragscreenstartPos.X, MousePos.X), Math.Min(temp_dragscreenstartPos.Y, MousePos.Y)); Vector2 max = new Vector2(Math.Max(temp_dragscreenstartPos.X, MousePos.X), Math.Max(temp_dragscreenstartPos.Y, MousePos.Y)); Vector2 size = max - min; DrawRect(_spriteBatch, temp_dragscreenstartPos, MousePos, Color.LimeGreen, 2); _spriteBatch.Draw(gridtexture, new Rectangle((int)min.X, (int)min.Y, (int)size.X, (int)size.Y), null, new Color(128, 255, 128, 64), 0, new Vector2(), SpriteEffects.None, 0); } else if (mapeditor.SelectLocation.Count == 0) { //생성 if (gridsize == 0) { gridsize = 1; } Vector2 StartPos = new Vector2((float)(Math.Round(mouse_DragMapStart.X / gridsize) * gridsize), (float)(Math.Round(mouse_DragMapStart.Y / gridsize) * gridsize)); Vector2 EndPos = mapeditor.PosScreenToMap(MousePos); EndPos = new Vector2((float)(Math.Round(EndPos.X / gridsize) * gridsize), (float)(Math.Round(EndPos.Y / gridsize) * gridsize)); Vector2 min = new Vector2(Math.Min(StartPos.X, EndPos.X), Math.Min(StartPos.Y, EndPos.Y)); Vector2 max = new Vector2(Math.Max(StartPos.X, EndPos.X), Math.Max(StartPos.Y, EndPos.Y)); temp_locCreatemin = new Vector2(0, 0); temp_locCreatemax = new Vector2(mapeditor.mapdata.WIDTH * 32, mapeditor.mapdata.HEIGHT * 32); temp_locCreatemin = VectorTool.Max(temp_locCreatemin, min); temp_locCreatemax = VectorTool.Min(temp_locCreatemax, max); Vector2 LocSize = temp_locCreatemax - temp_locCreatemin; temp_locCreatemin = mapeditor.PosMapToScreen(temp_locCreatemin); temp_locCreatemax = mapeditor.PosMapToScreen(temp_locCreatemax); temp_locCreatesize = temp_locCreatemax - temp_locCreatemin; if (temp_locCreatesize.X > 0 & temp_locCreatesize.Y > 0) { DrawLocationRect(_spriteBatch, string.Format("{0:0.0} ", (LocSize.X / 32)) + " X " + string.Format("{0:0.0} ", (LocSize.Y / 32)), temp_locCreatemin, temp_locCreatemax, Color.White, (float)(2 / mapeditor.opt_scalepercent), (float)(2 * mapeditor.opt_scalepercent)); DrawRect(_spriteBatch, temp_locCreatemin, temp_locCreatemax, Color.White, 2); _spriteBatch.Draw(gridtexture, new Rectangle((int)temp_locCreatemin.X, (int)temp_locCreatemin.Y, (int)temp_locCreatesize.X, (int)temp_locCreatesize.Y), null, new Color(128, 128, 255, 64), 0, new Vector2(), SpriteEffects.None, 0); } } } } _spriteBatch.End(); if (mapeditor.PalleteLayer == Control.MapEditor.Layer.Location) { if (key_QDown) { mapeditor.MouseCursorChange(Cursors.Cross); } else { mapeditor.MouseCursorChange(Cursors.Arrow); } if (hoverLoc.Count >= 1) { for (int i = 0; i < hoverLoc.Count; i++) { if (mapeditor.SelectLocation.IndexOf(hoverLoc[0]) == -1) { //하나라도 포함되지 않은게 있을 경우 탈출 return; } } //사이즈 체인지인지 확인 for (int i = 0; i < hoverLoc.Count; i++) { Vector2 min = new Vector2(Math.Min(hoverLoc[i].L, hoverLoc[i].R), Math.Min(hoverLoc[i].T, hoverLoc[i].B)); Vector2 max = new Vector2(Math.Max(hoverLoc[i].L, hoverLoc[i].R), Math.Max(hoverLoc[i].T, hoverLoc[i].B)); Vector2 size = max - min; IsL = false; IsR = false; IsT = false; IsB = false; if ((size.X < Thick * 2.5) | (size.Y < Thick * 2.5)) { mapeditor.MouseCursorChange(Cursors.SizeAll); return; } Vector2 mousepos = mapeditor.PosScreenToMap(MousePos); if (min.X - Thick < mousepos.X & mousepos.X < min.X + Thick) { IsL = true; } if (max.X - Thick < mousepos.X & mousepos.X < max.X + Thick) { IsR = true; } if (min.Y - Thick < mousepos.Y & mousepos.Y < min.Y + Thick) { IsT = true; } if (max.Y - Thick < mousepos.Y & mousepos.Y < max.Y + Thick) { IsB = true; } if (IsL) { if (IsT) { mapeditor.MouseCursorChange(Cursors.SizeNWSE); return; } else if (IsB) { mapeditor.MouseCursorChange(Cursors.SizeNESW); return; } else { mapeditor.MouseCursorChange(Cursors.SizeWE); return; } } if (IsR) { if (IsT) { mapeditor.MouseCursorChange(Cursors.SizeNESW); return; } else if (IsB) { mapeditor.MouseCursorChange(Cursors.SizeNWSE); return; } else { mapeditor.MouseCursorChange(Cursors.SizeWE); return; } } if (IsB) { mapeditor.MouseCursorChange(Cursors.SizeNS); return; } if (IsT) { mapeditor.MouseCursorChange(Cursors.SizeNS); return; } } mapeditor.MouseCursorChange(Cursors.SizeAll); } } }