private void SetMovementPathToNewExploreLocation(WorldView worldView) { // find closest unexplored cell var cellGrid = worldView.CellGrid; var cell = cellGrid.GetClosestUnexploredCell(StackView.LocationHex); if (cell == Cell.Empty) { // all locations explored StackView.SetStatusToNone(); StackView.Unselect(); } // find best path to unexplored cell var path = MovementPathDeterminer.DetermineMovementPath(StackView.HexLibrary, StackView.Stack, StackView.LocationHex, cell.ToPoint, cellGrid); if (path.Count == 0) { // could not find a path to location StackView.SetStatusToNone(); StackView.Unselect(); } path = path.RemoveLast(StackView.SightRange); StackView.MovementPath = path; }
internal StackViewSelectedState(StackView stackView) { StackView = stackView; BlinkCooldownInMilliseconds = BLINK_TIME_IN_MILLISECONDS; Blink = false; StackView.PotentialMovementPath = new List <PointI>(); StackView.SetAsCurrent(StackView); StackView.FocusCameraOn(); StackView.SetStatusToNone(); }