This commit is contained in:
OliverS 2024-02-03 23:48:30 +01:00
commit 2ddd79e931
7 changed files with 13534 additions and 14951 deletions

File diff suppressed because it is too large Load Diff

View File

@ -122,7 +122,7 @@ CircleCollider2D:
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 64
m_Bits: 192
m_LayerOverridePriority: 0
m_ForceSendLayers:
serializedVersion: 2

View File

@ -122,7 +122,7 @@ CircleCollider2D:
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 64
m_Bits: 192
m_LayerOverridePriority: 0
m_ForceSendLayers:
serializedVersion: 2

View File

@ -412,8 +412,8 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1229295201}
- {fileID: 2041669625}
- {fileID: 659231496}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &483723114
@ -448,107 +448,6 @@ Transform:
- {fileID: 147729522}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &659231495
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 659231496}
- component: {fileID: 659231497}
- component: {fileID: 659231498}
m_Layer: 0
m_Name: Ground
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &659231496
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 659231495}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 100, y: 100, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 480860136}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &659231497
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 659231495}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: -3
m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3}
m_Color: {r: 0.21960786, g: 0.21960786, b: 0.21960786, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!114 &659231498
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 659231495}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9809bf1345abc5648af68b3a82653f08, type: 3}
m_Name:
m_EditorClassIdentifier:
m_OverrideArea: 0
m_Area: 0
m_IgnoreFromBuild: 0
m_AffectedAgents: ffffffff
--- !u!1001 &869964773
PrefabInstance:
m_ObjectHideFlags: 0
@ -636,6 +535,68 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4aabce12c1341ff488ee4dc806fd80e8, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &1229295200
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 480860136}
m_Modifications:
- target: {fileID: 1675897312316268218, guid: 5846f4d0fc6a1a44ba388893e7ff9373, type: 3}
propertyPath: m_Name
value: Ground
objectReference: {fileID: 0}
- target: {fileID: 3862814901187971034, guid: 5846f4d0fc6a1a44ba388893e7ff9373, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3862814901187971034, guid: 5846f4d0fc6a1a44ba388893e7ff9373, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3862814901187971034, guid: 5846f4d0fc6a1a44ba388893e7ff9373, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3862814901187971034, guid: 5846f4d0fc6a1a44ba388893e7ff9373, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3862814901187971034, guid: 5846f4d0fc6a1a44ba388893e7ff9373, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3862814901187971034, guid: 5846f4d0fc6a1a44ba388893e7ff9373, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3862814901187971034, guid: 5846f4d0fc6a1a44ba388893e7ff9373, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3862814901187971034, guid: 5846f4d0fc6a1a44ba388893e7ff9373, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3862814901187971034, guid: 5846f4d0fc6a1a44ba388893e7ff9373, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3862814901187971034, guid: 5846f4d0fc6a1a44ba388893e7ff9373, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 5846f4d0fc6a1a44ba388893e7ff9373, type: 3}
--- !u!4 &1229295201 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3862814901187971034, guid: 5846f4d0fc6a1a44ba388893e7ff9373, type: 3}
m_PrefabInstance: {fileID: 1229295200}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1232208432
PrefabInstance:
m_ObjectHideFlags: 0

File diff suppressed because it is too large Load Diff

View File

@ -93,12 +93,17 @@ public class NewBehaviourScript : MonoBehaviour
void SpawnRandom(float difficulty)
{
while (difficulty > 0.5f) // Spawn until difficulty is less than 0.5f
while (difficulty > 1f) // Spawn until difficulty is less than 0.5f
{
var validEnemies = enemyList.Where(x => x.Difficulty <= difficulty).ToArray();
var enemyToSpawn = validEnemies[UnityEngine.Random.Range(0, validEnemies.Length)];
int enemyIndex = UnityEngine.Random.Range(0, validEnemies.Length);
var enemyToSpawn = validEnemies[enemyIndex];
difficulty -= enemyToSpawn.Difficulty;
GameObject enemy = Instantiate(enemyToSpawn.prefabs[UnityEngine.Random.Range(0, enemyToSpawn.prefabs.Length)], GetRandomPointOnCircle(mainCam.transform.position, SpawnRadius), Quaternion.identity, SpawnedEnenmyHolder.transform);
int variant = UnityEngine.Random.Range(0, enemyToSpawn.prefabs.Length);
GameObject variantToSpawn = enemyToSpawn.prefabs[variant];
GameObject enemy = Instantiate(variantToSpawn, GetRandomPointOnCircle(mainCam.transform.position, SpawnRadius), Quaternion.identity, SpawnedEnenmyHolder.transform);
enemy.GetComponent<EnemyPathFinding>().targets = players.Select(x => x.transform).ToArray();
}

View File

@ -18,7 +18,7 @@ PhysicsManager:
m_ClothInterCollisionDistance: 0.1
m_ClothInterCollisionStiffness: 0.2
m_ContactsGeneration: 1
m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffff3fffffffbfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffff3fffffff3fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
m_SimulationMode: 0
m_AutoSyncTransforms: 0
m_ReuseCollisionCallbacks: 1