public void ShowPath() { ActionInformation.Show("Movement", "0", "You know, lets you move"); Menu.Hide(); selected = Cursor.hovered; _path = Helpers.DeriveShortestPath(selected.xPos, selected.zPos, Unit.current.xPos, Unit.current.zPos, Unit.current); HighlightTiles(_path); }
public static void ShowActionCursors(Unit unit, int actionIndex) { showingActionCursors = true; UnitAction action = unit.Actions()[actionIndex].GetComponent <UnitAction>(); ActionInformation.Show(action.Name(), action.MpCost().ToString(), action.actionType().ToString() + " -- " + action.Description()); Unit.Coordinate projectedCoordinate = unit.ProjectedCoordinate(); int xPos = projectedCoordinate.xPos; int zPos = projectedCoordinate.zPos; List <Cursor> tiles = Helpers.GetRadialTiles(xPos, zPos, action.MaxDistance(), action.MaxHeightDifference(), action.CanTargetOthers(), action.MinDistance(), action.HeightAssisted()); foreach (Cursor tile in tiles) { if (IsValidTarget(Unit.Subject(), action, tile, xPos, zPos)) { tile.SetAttack(); } } }
public void OnPointerEnter(PointerEventData eventData) { ActionInformation.Show(actionName, mpCost, description); }