public void NextTurn() { activePlayerIndex += 1; activePlayerIndex = activePlayerIndex % player.Length; if (activePlayerIndex == 0) { CountDownOppressingTurns(); if (GameOver()) { return; } TurnChangingIncome(); actualTurn += 1; panelControler.ChangeTurnText(actualTurn); } if (!playerIsActive[activePlayerIndex]) { NextTurn(); return; } if (player[activePlayerIndex].CheckIfLost()) { playerIsActive [activePlayerIndex] = false; NextTurn(); return; } Debug.Log(String.Format("Player {0} has {1} points in actual state!", activePlayerIndex, player [activePlayerIndex].GetActualStateCost(true))); // Define actual state and insert it on top of the stack. panelControler.ChangeActivePlayer("Player " + (activePlayerIndex + 1)); panelControler.updateCoins(player [activePlayerIndex].coinCount); FocusCameraOn(player [activePlayerIndex]); ClearTiredCreaturesList(); ClearSelections(); }