Beispiel #1
0
    //End the current turn
    public void NextTurn()
    {
        if (_activeEnemies == 0)
        {
            _combatOver._playerWin = true;
            _combatOver.EnableEndCanvas();
            return;
        }
        if (_player._dead)
        {
            return;
        }
        //Disable the active variable for the current combatant and activate NavMeshObstacle
        _enemy._active = false;
        //_enemy._agent.enabled = false;
        //_enemy._obstacle.enabled = true;
        _enemy._agent.Stop();
        _player._active = false;
        //_player._agent.enabled = false;
        //_player._obstacle.enabled = true;
        _player._agent.Stop();

        //Increase the turn index by 1 or drop to 0, update the portrait highlighter
        if (_turnIndex < (_generator._sortedInit.Count - 1))
        {
            _turnIndex++;
        }
        else
        {
            _turnIndex = 0;
        }
        //Call the function to enable the next GO
        ActivateGO();
    }
Beispiel #2
0
    IEnumerator ChangeCanvas()
    {
        yield return(new WaitForSeconds(3.0f));

        _combatOver.EnableEndCanvas();
    }