Esempio n. 1
0
    void UpdatePlayerTurn_Action(CardData card, EntityData player, Vector2Int originPosition, Vector2Int targetPosition)
    {
        Tile playerTile = BoardController.CurrentBoard.GetTileAtPosition(originPosition);
        Tile targetTile = BoardController.CurrentBoard.GetTileAtPosition(targetPosition);

        GetPlayerTurn().action = new Action(card, player, BoardHelperFunctions.GetDirectionBetweenTiles(playerTile, targetTile), BoardHelperFunctions.GetLinearDistanceBetweenTiles(playerTile, targetTile));
        energyManager.UpdateProjectedEnergyCost(card.energyCost);
    }