Example #1
0
    public void StartPlayerTurn()
    {
        Debug.Log("Start Player Turn");
        _playerTurn = true;

        // Party global effects
        //_partyManager.UpdateStartTurnGlobalEffects();

        // Start turn status check
        List <BaseUnit> units = _partyManager.GetUnits();

        for (int i = units.Count - 1; i >= 0; i--)
        {
            BaseUnit unit = units[i];
            unit.ExecuteStartTurnStatuses();
        }

        // Turn hand UI and cards on
        _hand.gameObject.SetActive(true);

        // Draw hand cards
        _hand.Deal();

        // Enable battleground targeting
        _battleground.SetTargetShape(TargetShape.Single, TargetEntity.Enemy);
        _battleground.SetTargetTile(true);

        // Draw next AI cards and show them
        _aiManager.DealAICards();

        _resourceManager.CalculateResources();
    }