diff --git a/Assets/Scripts/Controller/EnemySpawner/EnemySpawner.cs b/Assets/Scripts/Controller/EnemySpawner/EnemySpawner.cs index ba19bdb..af02df7 100644 --- a/Assets/Scripts/Controller/EnemySpawner/EnemySpawner.cs +++ b/Assets/Scripts/Controller/EnemySpawner/EnemySpawner.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; +using Unity.Mathematics; using Unity.VisualScripting; using UnityEngine; using UnityEngine.AI; @@ -16,8 +17,7 @@ public class EnemySpawner : MonoBehaviour public float difficulty = 1f; // Inspector - [SerializeField] private float difficultyIncreasePerWave = 0.1f; - [SerializeField] private float difficultyMultiplyDecreasePerWave = 0.1f; + [SerializeField] private float difficultyIncreasePerWave = 1f; [SerializeField] private float WaveTime = 20f; [SerializeField] private List enemyDifficulties; [SerializeField] private float SpawnRadius = 10; @@ -61,11 +61,7 @@ public class EnemySpawner : MonoBehaviour SpawnWave(difficulty); Wave++; - if (difficultyIncreasePerWave > 1f) - { - difficultyIncreasePerWave -= difficultyMultiplyDecreasePerWave; - difficulty *= difficultyIncreasePerWave + 1; - } + difficulty *= MathF.Cbrt(difficultyIncreasePerWave); nextWaveRequested = false; timer = 0; }