Starts spawning enemies faster
This commit is contained in:
parent
9c40dec24f
commit
6f4cb67186
|
@ -29,8 +29,8 @@ Transform:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2173372557174057003}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.010014362, y: 0.025269484, z: -0.0002531513, w: 0.9996305}
|
||||
m_LocalPosition: {x: -4.3259, y: -19.329144, z: -10}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -13.048559, y: -19.467272, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
|
@ -71,7 +71,7 @@ Camera:
|
|||
far clip plane: 5000
|
||||
field of view: 60.000004
|
||||
orthographic: 1
|
||||
orthographic size: 7.5
|
||||
orthographic size: 12.5
|
||||
m_Depth: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
|
@ -187,14 +187,15 @@ MonoBehaviour:
|
|||
m_EditorClassIdentifier:
|
||||
Wave: 0
|
||||
difficulty: 1
|
||||
difficultyIncreasePerWave: 0.75
|
||||
WaveTime: 5
|
||||
difficultyIncreasePerWave: 0.25
|
||||
WaveTime: 20
|
||||
enemyDifficulties: []
|
||||
SpawnRadius: 17.8
|
||||
SpawnRadius: 22.6
|
||||
NumEnemies: 6
|
||||
players:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
initialSpawnDelay: 0
|
||||
enemyList: []
|
||||
--- !u!1 &2607936989766580656
|
||||
GameObject:
|
||||
|
@ -222,7 +223,7 @@ Transform:
|
|||
m_GameObject: {fileID: 2607936989766580656}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -4.3259, y: -19.329144, z: 0}
|
||||
m_LocalPosition: {x: -13.048559, y: -19.467272, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
|
@ -246,10 +247,10 @@ MonoBehaviour:
|
|||
m_Targets:
|
||||
- target: {fileID: 0}
|
||||
weight: 1
|
||||
radius: 2
|
||||
radius: 3
|
||||
- target: {fileID: 0}
|
||||
weight: 1
|
||||
radius: 2
|
||||
radius: 3
|
||||
--- !u!1 &6306269600238927148
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -260,6 +261,7 @@ GameObject:
|
|||
m_Component:
|
||||
- component: {fileID: 3197454023887695364}
|
||||
- component: {fileID: 1945378220081163713}
|
||||
- component: {fileID: 4060518028321021500}
|
||||
m_Layer: 0
|
||||
m_Name: Virtual Camera
|
||||
m_TagString: Untagged
|
||||
|
@ -275,8 +277,8 @@ Transform:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6306269600238927148}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.010014362, y: 0.025269484, z: -0.0002531513, w: 0.9996305}
|
||||
m_LocalPosition: {x: -4.3259, y: -19.329144, z: -10}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -13.048559, y: -19.467272, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
|
@ -322,6 +324,20 @@ MonoBehaviour:
|
|||
m_Calls: []
|
||||
m_LegacyBlendHint: 0
|
||||
m_ComponentOwner: {fileID: 4498264854370183204}
|
||||
--- !u!114 &4060518028321021500
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6306269600238927148}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 38fb1d450df272f49b06540bb0a4ab88, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
MinPitch: 0
|
||||
MaxPitch: 0
|
||||
--- !u!1 &6455280833853463581
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -414,7 +430,7 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: fa7155796051b734daa718462081dc5f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_BindingMode: 3
|
||||
m_BindingMode: 1
|
||||
m_FollowOffset: {x: 0, y: 0, z: -10}
|
||||
m_XDamping: 1
|
||||
m_YDamping: 1
|
||||
|
@ -461,5 +477,5 @@ MonoBehaviour:
|
|||
m_MaximumDistance: 5000
|
||||
m_MinimumFOV: 3
|
||||
m_MaximumFOV: 60
|
||||
m_MinimumOrthoSize: 7.5
|
||||
m_MinimumOrthoSize: 12.5
|
||||
m_MaximumOrthoSize: 5000
|
||||
|
|
|
@ -3487,19 +3487,19 @@ PrefabInstance:
|
|||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3197454023887695364, guid: c53e6971c95afb1429cd82616a7b6737, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.9979576
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3197454023887695364, guid: c53e6971c95afb1429cd82616a7b6737, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 9.296001e-13
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3197454023887695364, guid: c53e6971c95afb1429cd82616a7b6737, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0.06388041
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3197454023887695364, guid: c53e6971c95afb1429cd82616a7b6737, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 1.4522473e-11
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3401975006071930001, guid: c53e6971c95afb1429cd82616a7b6737, type: 3}
|
||||
propertyPath: m_Targets.Array.data[0].radius
|
||||
|
@ -3521,6 +3521,10 @@ PrefabInstance:
|
|||
propertyPath: WaveTime
|
||||
value: 20
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3603265075407754381, guid: c53e6971c95afb1429cd82616a7b6737, type: 3}
|
||||
propertyPath: SpawnRadius
|
||||
value: 22.6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3603265075407754381, guid: c53e6971c95afb1429cd82616a7b6737, type: 3}
|
||||
propertyPath: players.Array.data[0]
|
||||
value:
|
||||
|
@ -3587,19 +3591,19 @@ PrefabInstance:
|
|||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8946450710138871461, guid: c53e6971c95afb1429cd82616a7b6737, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.9979576
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8946450710138871461, guid: c53e6971c95afb1429cd82616a7b6737, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 9.296001e-13
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8946450710138871461, guid: c53e6971c95afb1429cd82616a7b6737, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0.06388041
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8946450710138871461, guid: c53e6971c95afb1429cd82616a7b6737, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 1.4522473e-11
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
|
|
|
@ -8,7 +8,7 @@ using Unity.VisualScripting;
|
|||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
public class NewBehaviourScript : MonoBehaviour
|
||||
public class EnemySpawner : MonoBehaviour
|
||||
{
|
||||
// Shared
|
||||
public int Wave = 0;
|
||||
|
@ -21,6 +21,7 @@ public class NewBehaviourScript : MonoBehaviour
|
|||
[SerializeField] private float SpawnRadius = 10;
|
||||
[SerializeField] private int NumEnemies = 6;
|
||||
[SerializeField] private GameObject[] players;
|
||||
[SerializeField] private float initialSpawnDelay = 5;
|
||||
|
||||
// Private
|
||||
private bool nextWaveRequested = false;
|
||||
|
@ -41,6 +42,8 @@ public class NewBehaviourScript : MonoBehaviour
|
|||
enemyList.Add(new EnemyPrefabInfo() { Difficulty = i+1, prefabs = Resources.LoadAll<GameObject>("Enemies/" + (i+1)) });
|
||||
}
|
||||
|
||||
timer = WaveTime - initialSpawnDelay;
|
||||
|
||||
StartSpawning();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue