diff --git a/Assets/Scenes/GameScene.unity b/Assets/Scenes/GameScene.unity index 5c21958..4301c38 100644 --- a/Assets/Scenes/GameScene.unity +++ b/Assets/Scenes/GameScene.unity @@ -1497,25 +1497,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 880679715} m_CullTransparentMesh: 1 ---- !u!1 &1105072965 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 6306269600238927148, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} - m_PrefabInstance: {fileID: 5796191506433166633} - m_PrefabAsset: {fileID: 0} ---- !u!114 &1105072968 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1105072965} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 38fb1d450df272f49b06540bb0a4ab88, type: 3} - m_Name: - m_EditorClassIdentifier: - MinPitch: 0 - MaxPitch: 0 --- !u!4 &1194834060 stripped Transform: m_CorrespondingSourceObject: {fileID: 320690117028550720, guid: 30e0cc55a67f02d4f92b2677ec4b1511, type: 3} @@ -3453,77 +3434,17 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - - target: {fileID: 1609280383408315754, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} - propertyPath: orthographic size - value: 12.5 - objectReference: {fileID: 0} - - target: {fileID: 1655227407111773373, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} - propertyPath: m_BindingMode - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 1655227407111773373, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} - propertyPath: m_AngularDampingMode - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1873901299772310795, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} - propertyPath: m_MinimumOrthoSize - value: 12.5 - objectReference: {fileID: 0} - - target: {fileID: 2849751201525768572, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} - propertyPath: m_LocalPosition.x - value: -13.048559 - objectReference: {fileID: 0} - - target: {fileID: 2849751201525768572, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} - propertyPath: m_LocalPosition.y - value: -19.467272 - objectReference: {fileID: 0} - - target: {fileID: 3197454023887695364, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} - propertyPath: m_LocalPosition.x - value: -13.048559 - objectReference: {fileID: 0} - - target: {fileID: 3197454023887695364, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} - propertyPath: m_LocalPosition.y - value: -19.467272 - objectReference: {fileID: 0} - - target: {fileID: 3197454023887695364, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3197454023887695364, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 3197454023887695364, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 3197454023887695364, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 3401975006071930001, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} - propertyPath: m_Targets.Array.data[0].radius - value: 3 - objectReference: {fileID: 0} - target: {fileID: 3401975006071930001, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} propertyPath: m_Targets.Array.data[0].target value: objectReference: {fileID: 1232208440} - - target: {fileID: 3401975006071930001, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} - propertyPath: m_Targets.Array.data[1].radius - value: 3 - objectReference: {fileID: 0} - target: {fileID: 3401975006071930001, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} propertyPath: m_Targets.Array.data[1].target value: objectReference: {fileID: 1194834060} - target: {fileID: 3603265075407754381, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} - propertyPath: WaveTime - value: 20 - objectReference: {fileID: 0} - - target: {fileID: 3603265075407754381, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} - propertyPath: SpawnRadius - value: 22.6 + propertyPath: initialSpawnDelay + value: 5 objectReference: {fileID: 0} - target: {fileID: 3603265075407754381, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} propertyPath: players.Array.data[0] @@ -3533,10 +3454,6 @@ PrefabInstance: propertyPath: players.Array.data[1] value: objectReference: {fileID: 1579580564} - - target: {fileID: 3603265075407754381, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} - propertyPath: difficultyIncreasePerWave - value: 0.25 - objectReference: {fileID: 0} - target: {fileID: 5959206239141280122, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} propertyPath: m_LocalPosition.x value: 0 @@ -3581,37 +3498,10 @@ PrefabInstance: propertyPath: m_Name value: CameraRig objectReference: {fileID: 0} - - target: {fileID: 8946450710138871461, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} - propertyPath: m_LocalPosition.x - value: -13.048559 - objectReference: {fileID: 0} - - target: {fileID: 8946450710138871461, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} - propertyPath: m_LocalPosition.y - value: -19.467272 - objectReference: {fileID: 0} - - target: {fileID: 8946450710138871461, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 8946450710138871461, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 8946450710138871461, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 8946450710138871461, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] - m_AddedComponents: - - targetCorrespondingSourceObject: {fileID: 6306269600238927148, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} - insertIndex: -1 - addedObject: {fileID: 1105072968} + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: c53e6971c95afb1429cd82616a7b6737, type: 3} --- !u!1001 &7693964683212020007 PrefabInstance: diff --git a/Assets/Scripts/Controller/EnemySpawner/EnemySpawner.cs b/Assets/Scripts/Controller/EnemySpawner/EnemySpawner.cs index afeabeb..28421cd 100644 --- a/Assets/Scripts/Controller/EnemySpawner/EnemySpawner.cs +++ b/Assets/Scripts/Controller/EnemySpawner/EnemySpawner.cs @@ -12,10 +12,11 @@ public class EnemySpawner : MonoBehaviour { // Shared public int Wave = 0; - public float difficulty = 1; + public float difficulty = 1f; // Inspector [SerializeField] private float difficultyIncreasePerWave = 0.1f; + [SerializeField] private float difficultyMultiplyDecreasePerWave = 0.1f; [SerializeField] private float WaveTime = 20f; [SerializeField] private List enemyDifficulties; [SerializeField] private float SpawnRadius = 10; @@ -59,7 +60,11 @@ public class EnemySpawner : MonoBehaviour SpawnWave(difficulty); Wave++; - difficulty *= difficultyIncreasePerWave + 1; + if (difficultyIncreasePerWave > 1f) + { + difficultyIncreasePerWave -= difficultyMultiplyDecreasePerWave; + difficulty *= difficultyIncreasePerWave + 1; + } nextWaveRequested = false; timer = 0; }