private void CheckTension(bool isAlly) { if (!isAlly) //ENEMY { Tension lastTension = currentEnemyTension; if (tensionEnemyValue < 2f) { currentEnemyTension = Tension.PEACEFUL; } else if (tensionEnemyValue < 3f) { currentEnemyTension = Tension.LOW; } else if (tensionEnemyValue < 4f) { currentEnemyTension = Tension.MEDIUM; } else if (tensionEnemyValue < 5f) { currentEnemyTension = Tension.DANGER; } else { currentEnemyTension = Tension.THREAT; } if (currentEnemyTension > lastTension) { radarController.GoToNextCheckpoint(isAlly, false); } if (currentEnemyTension < lastTension) { radarController.GoToNextCheckpoint(isAlly, true); } } else //ALLY { Tension lastTension = currentAllyTension; if (tensionAllyValue < 2f) { currentAllyTension = Tension.PEACEFUL; } else if (tensionAllyValue < 3f) { currentAllyTension = Tension.LOW; } else if (tensionAllyValue < 4f) { currentAllyTension = Tension.MEDIUM; } else if (tensionAllyValue < 5f) { currentAllyTension = Tension.DANGER; } else { currentAllyTension = Tension.THREAT; } if (currentAllyTension > lastTension) { radarController.GoToNextCheckpoint(isAlly, true); } if (currentAllyTension < lastTension) { radarController.GoToNextCheckpoint(isAlly, false); } } }