Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
    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();
            }
        }
    }
Ejemplo n.º 3
0
 public void OnPointerEnter(PointerEventData eventData)
 {
     ActionInformation.Show(actionName, mpCost, description);
 }