public void SwitchTurn() { CooldownManager.instance.SwitchTurn(); if (state == BattleState.IDLE) { int randomTurn = Random.Range(0, 10); if (randomTurn > 4) { state = BattleState.PLAYERTURN; PlayerTurn(); } else { state = BattleState.ENEMYTURN; agent.RequestDecision(); } } else if (state == BattleState.PLAYERTURN) { state = BattleState.ENEMYTURN; agent.RequestDecision(); } else if (state == BattleState.ENEMYTURN) { state = BattleState.PLAYERTURN; PlayerTurn(); } }