Tweaked spawning speed
This commit is contained in:
parent
6f4cb67186
commit
0be229e41b
|
@ -1497,25 +1497,6 @@ CanvasRenderer:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 880679715}
|
m_GameObject: {fileID: 880679715}
|
||||||
m_CullTransparentMesh: 1
|
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
|
--- !u!4 &1194834060 stripped
|
||||||
Transform:
|
Transform:
|
||||||
m_CorrespondingSourceObject: {fileID: 320690117028550720, guid: 30e0cc55a67f02d4f92b2677ec4b1511, type: 3}
|
m_CorrespondingSourceObject: {fileID: 320690117028550720, guid: 30e0cc55a67f02d4f92b2677ec4b1511, type: 3}
|
||||||
|
@ -3453,77 +3434,17 @@ PrefabInstance:
|
||||||
serializedVersion: 3
|
serializedVersion: 3
|
||||||
m_TransformParent: {fileID: 0}
|
m_TransformParent: {fileID: 0}
|
||||||
m_Modifications:
|
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}
|
- target: {fileID: 3401975006071930001, guid: c53e6971c95afb1429cd82616a7b6737, type: 3}
|
||||||
propertyPath: m_Targets.Array.data[0].target
|
propertyPath: m_Targets.Array.data[0].target
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 1232208440}
|
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}
|
- target: {fileID: 3401975006071930001, guid: c53e6971c95afb1429cd82616a7b6737, type: 3}
|
||||||
propertyPath: m_Targets.Array.data[1].target
|
propertyPath: m_Targets.Array.data[1].target
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 1194834060}
|
objectReference: {fileID: 1194834060}
|
||||||
- target: {fileID: 3603265075407754381, guid: c53e6971c95afb1429cd82616a7b6737, type: 3}
|
- target: {fileID: 3603265075407754381, guid: c53e6971c95afb1429cd82616a7b6737, type: 3}
|
||||||
propertyPath: WaveTime
|
propertyPath: initialSpawnDelay
|
||||||
value: 20
|
value: 5
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 3603265075407754381, guid: c53e6971c95afb1429cd82616a7b6737, type: 3}
|
|
||||||
propertyPath: SpawnRadius
|
|
||||||
value: 22.6
|
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 3603265075407754381, guid: c53e6971c95afb1429cd82616a7b6737, type: 3}
|
- target: {fileID: 3603265075407754381, guid: c53e6971c95afb1429cd82616a7b6737, type: 3}
|
||||||
propertyPath: players.Array.data[0]
|
propertyPath: players.Array.data[0]
|
||||||
|
@ -3533,10 +3454,6 @@ PrefabInstance:
|
||||||
propertyPath: players.Array.data[1]
|
propertyPath: players.Array.data[1]
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 1579580564}
|
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}
|
- target: {fileID: 5959206239141280122, guid: c53e6971c95afb1429cd82616a7b6737, type: 3}
|
||||||
propertyPath: m_LocalPosition.x
|
propertyPath: m_LocalPosition.x
|
||||||
value: 0
|
value: 0
|
||||||
|
@ -3581,37 +3498,10 @@ PrefabInstance:
|
||||||
propertyPath: m_Name
|
propertyPath: m_Name
|
||||||
value: CameraRig
|
value: CameraRig
|
||||||
objectReference: {fileID: 0}
|
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_RemovedComponents: []
|
||||||
m_RemovedGameObjects: []
|
m_RemovedGameObjects: []
|
||||||
m_AddedGameObjects: []
|
m_AddedGameObjects: []
|
||||||
m_AddedComponents:
|
m_AddedComponents: []
|
||||||
- targetCorrespondingSourceObject: {fileID: 6306269600238927148, guid: c53e6971c95afb1429cd82616a7b6737, type: 3}
|
|
||||||
insertIndex: -1
|
|
||||||
addedObject: {fileID: 1105072968}
|
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: c53e6971c95afb1429cd82616a7b6737, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: c53e6971c95afb1429cd82616a7b6737, type: 3}
|
||||||
--- !u!1001 &7693964683212020007
|
--- !u!1001 &7693964683212020007
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
|
|
|
@ -12,10 +12,11 @@ public class EnemySpawner : MonoBehaviour
|
||||||
{
|
{
|
||||||
// Shared
|
// Shared
|
||||||
public int Wave = 0;
|
public int Wave = 0;
|
||||||
public float difficulty = 1;
|
public float difficulty = 1f;
|
||||||
|
|
||||||
// Inspector
|
// Inspector
|
||||||
[SerializeField] private float difficultyIncreasePerWave = 0.1f;
|
[SerializeField] private float difficultyIncreasePerWave = 0.1f;
|
||||||
|
[SerializeField] private float difficultyMultiplyDecreasePerWave = 0.1f;
|
||||||
[SerializeField] private float WaveTime = 20f;
|
[SerializeField] private float WaveTime = 20f;
|
||||||
[SerializeField] private List<float> enemyDifficulties;
|
[SerializeField] private List<float> enemyDifficulties;
|
||||||
[SerializeField] private float SpawnRadius = 10;
|
[SerializeField] private float SpawnRadius = 10;
|
||||||
|
@ -59,7 +60,11 @@ public class EnemySpawner : MonoBehaviour
|
||||||
SpawnWave(difficulty);
|
SpawnWave(difficulty);
|
||||||
|
|
||||||
Wave++;
|
Wave++;
|
||||||
difficulty *= difficultyIncreasePerWave + 1;
|
if (difficultyIncreasePerWave > 1f)
|
||||||
|
{
|
||||||
|
difficultyIncreasePerWave -= difficultyMultiplyDecreasePerWave;
|
||||||
|
difficulty *= difficultyIncreasePerWave + 1;
|
||||||
|
}
|
||||||
nextWaveRequested = false;
|
nextWaveRequested = false;
|
||||||
timer = 0;
|
timer = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue