Beispiel #1
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();
            }
        }
    }