示例#1
0
    /// <summary>
    /// Show the path the character will take when moving to the endTile.
    /// </summary>
    /// <param name="endTile"></param>
    public void ShowMove(MapTile endTile)
    {
        battleMap.ClearMovement();
        endTile.target = true;
        path.Clear();
        MapTile cTile = endTile;

        while (cTile.parent != null)
        {
            path.Push(cTile);
            cTile.pathable = true;
            cTile          = cTile.parent;
        }
    }
示例#2
0
    /// <summary>
    /// Used when selecting a tile to move to.
    /// </summary>
    /// <param name="x"></param>
    /// <param name="y"></param>
    private void MoveHover()
    {
        MapTile tile = battleMap.GetTile(cursorX.value, cursorY.value);

        if (currentMenumode.value == (int)MenuMode.FORMATION)
        {
            battleMap.ClearTargets();
            moveTile.value = tile;
            target.value   = tile;
            selectCharacter.value.currentTile.target = true;
            tile.target = true;
            updateCharacterUI.Invoke();
        }
        else
        {
            if (tile.selectable)
            {
                moveTile.value = tile;
                selectCharacter.value.ShowMove(tile);
                updateCharacterUI.Invoke();
            }
            else
            {
                moveTile.value = null;
                battleMap.ClearMovement();
            }
        }

        // Add features to allow the play to attack and heal target with movement.
    }