diff --git a/Assets/Prefabs/Abilities/VectorFencePrefab.prefab b/Assets/Prefabs/Abilities/VectorFencePrefab.prefab index dcbe94f..6be1cff 100644 --- a/Assets/Prefabs/Abilities/VectorFencePrefab.prefab +++ b/Assets/Prefabs/Abilities/VectorFencePrefab.prefab @@ -136,7 +136,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3} m_Name: m_EditorClassIdentifier: - GlobalObjectIdHash: 3892629208 + GlobalObjectIdHash: 1554870052 InScenePlacedSourceGlobalObjectIdHash: 0 AlwaysReplicateAsRoot: 0 SynchronizeTransform: 1 diff --git a/Assets/Scenes/BossRoom.unity b/Assets/Scenes/BossRoom.unity index c3e6da8..41efe58 100644 --- a/Assets/Scenes/BossRoom.unity +++ b/Assets/Scenes/BossRoom.unity @@ -8893,11 +8893,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 1676734515771252668, guid: 0193228de87741d40a42e561901c9083, type: 3} propertyPath: m_LocalRotation.w - value: 0.85294455 + value: 0.8529446 objectReference: {fileID: 0} - target: {fileID: 1676734515771252668, guid: 0193228de87741d40a42e561901c9083, type: 3} propertyPath: m_LocalRotation.x - value: 0.3943448 + value: 0.39434478 objectReference: {fileID: 0} - target: {fileID: 1676734515771252668, guid: 0193228de87741d40a42e561901c9083, type: 3} propertyPath: m_LocalRotation.y @@ -8905,7 +8905,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 1676734515771252668, guid: 0193228de87741d40a42e561901c9083, type: 3} propertyPath: m_LocalRotation.z - value: -0.14352979 + value: -0.14352977 objectReference: {fileID: 0} - target: {fileID: 1676734516302391364, guid: 0193228de87741d40a42e561901c9083, type: 3} propertyPath: m_UpdateMethod @@ -9162,15 +9162,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 203267159508449512, guid: 36b3ee75677a1544191c0ddaaadd8140, type: 3} propertyPath: m_LocalRotation.x - value: 0.39434484 + value: 0.3943448 objectReference: {fileID: 0} - target: {fileID: 203267159508449512, guid: 36b3ee75677a1544191c0ddaaadd8140, type: 3} propertyPath: m_LocalRotation.y - value: 0.3104465 + value: 0.31044644 objectReference: {fileID: 0} - target: {fileID: 203267159508449512, guid: 36b3ee75677a1544191c0ddaaadd8140, type: 3} propertyPath: m_LocalRotation.z - value: -0.1435298 + value: -0.14352976 objectReference: {fileID: 0} - target: {fileID: 203267159508449512, guid: 36b3ee75677a1544191c0ddaaadd8140, type: 3} propertyPath: m_LocalEulerAnglesHint.x @@ -9842,7 +9842,7 @@ MonoBehaviour: m_EditorClassIdentifier: timer: {fileID: 1521032483} serverAdditiveSceneLoader: {fileID: 3765979715153886893} - timeInSeconds: 20 + timeInSeconds: 120 --- !u!1 &1527274045 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/BossRoom/DungeonEntrance.unity b/Assets/Scenes/BossRoom/DungeonEntrance.unity index dea289d..58d2019 100644 --- a/Assets/Scenes/BossRoom/DungeonEntrance.unity +++ b/Assets/Scenes/BossRoom/DungeonEntrance.unity @@ -123,168 +123,6 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} ---- !u!1 &240007728 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 240007729} - - component: {fileID: 240007732} - - component: {fileID: 240007731} - - component: {fileID: 240007730} - - component: {fileID: 240007734} - - component: {fileID: 240007733} - - component: {fileID: 240007735} - m_Layer: 12 - m_Name: P (6) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!4 &240007729 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 240007728} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 3.87, y: -9.36, z: 4.34} - m_LocalScale: {x: 2, y: 18.606562, z: 2} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 286165427} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!65 &240007730 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 240007728} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &240007731 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 240007728} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: a2832164335141e429d567fbed8daa03, 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: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &240007732 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 240007728} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!65 &240007733 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 240007728} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 1 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 0.08, z: 1} - m_Center: {x: 0, y: 0.54, z: 0} ---- !u!114 &240007734 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 240007728} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fbadb65558c0b1a48b58b765317ed874, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &240007735 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 240007728} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3} - m_Name: - m_EditorClassIdentifier: - GlobalObjectIdHash: 2651067327 - InScenePlacedSourceGlobalObjectIdHash: 0 - AlwaysReplicateAsRoot: 0 - SynchronizeTransform: 1 - ActiveSceneSynchronization: 0 - SceneMigrationSynchronization: 1 - SpawnWithObservers: 1 - DontDestroyWithOwner: 0 - AutoObjectParentSync: 1 --- !u!1 &286165426 GameObject: m_ObjectHideFlags: 0 @@ -325,13 +163,6 @@ Transform: - {fileID: 249976107358570836} - {fileID: 5590359088119101749} - {fileID: 1202519841281415540} - - {fileID: 1146060682} - - {fileID: 676920372} - - {fileID: 1463337823} - - {fileID: 849256359} - - {fileID: 1620155725} - - {fileID: 240007729} - - {fileID: 997499840} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &286165428 @@ -370,7 +201,7 @@ MonoBehaviour: SpawnWithObservers: 1 DontDestroyWithOwner: 0 AutoObjectParentSync: 1 ---- !u!1 &676920371 +--- !u!1 &949745746 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -378,42 +209,142 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 676920372} - - component: {fileID: 676920375} - - component: {fileID: 676920374} - - component: {fileID: 676920373} - - component: {fileID: 676920377} - - component: {fileID: 676920376} - - component: {fileID: 676920378} - m_Layer: 12 - m_Name: P (2) + - component: {fileID: 949745749} + - component: {fileID: 949745748} + - component: {fileID: 949745747} + m_Layer: 0 + m_Name: Directional Light m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!4 &676920372 + m_IsActive: 1 +--- !u!114 &949745747 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 949745746} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Version: 3 + m_UsePipelineSettings: 1 + m_AdditionalLightsShadowResolutionTier: 2 + m_LightLayerMask: 1 + m_RenderingLayers: 1 + m_CustomShadowLayers: 0 + m_ShadowLayerMask: 1 + m_ShadowRenderingLayers: 1 + m_LightCookieSize: {x: 1, y: 1} + m_LightCookieOffset: {x: 0, y: 0} + m_SoftShadowQuality: 0 +--- !u!108 &949745748 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 949745746} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &949745749 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 676920371} + m_GameObject: {fileID: 949745746} serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.65, y: -9.36, z: 6.41} - m_LocalScale: {x: 2, y: 18.606562, z: 2} + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 286165427} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!65 &676920373 -BoxCollider: + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &1415641637 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1415641641} + - component: {fileID: 1415641640} + - component: {fileID: 1415641639} + - component: {fileID: 1415641638} + m_Layer: 8 + m_Name: Plane + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!64 &1415641638 +MeshCollider: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 676920371} + m_GameObject: {fileID: 1415641637} m_Material: {fileID: 0} m_IncludeLayers: serializedVersion: 2 @@ -425,737 +356,11 @@ BoxCollider: m_IsTrigger: 0 m_ProvidesContacts: 0 m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &676920374 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 676920371} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: a2832164335141e429d567fbed8daa03, 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: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &676920375 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 676920371} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!65 &676920376 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 676920371} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 1 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 0.08, z: 1} - m_Center: {x: 0, y: 0.54, z: 0} ---- !u!114 &676920377 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 676920371} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fbadb65558c0b1a48b58b765317ed874, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &676920378 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 676920371} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3} - m_Name: - m_EditorClassIdentifier: - GlobalObjectIdHash: 2844845740 - InScenePlacedSourceGlobalObjectIdHash: 0 - AlwaysReplicateAsRoot: 0 - SynchronizeTransform: 1 - ActiveSceneSynchronization: 0 - SceneMigrationSynchronization: 1 - SpawnWithObservers: 1 - DontDestroyWithOwner: 0 - AutoObjectParentSync: 1 ---- !u!1 &849256358 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 849256359} - - component: {fileID: 849256362} - - component: {fileID: 849256361} - - component: {fileID: 849256360} - - component: {fileID: 849256364} - - component: {fileID: 849256363} - - component: {fileID: 849256365} - m_Layer: 12 - m_Name: P (4) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!4 &849256359 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 849256358} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.53, y: -9.36, z: -2.48} - m_LocalScale: {x: 2, y: 18.606562, z: 2} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 286165427} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!65 &849256360 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 849256358} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &849256361 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 849256358} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: a2832164335141e429d567fbed8daa03, 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: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &849256362 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 849256358} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!65 &849256363 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 849256358} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 1 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 0.08, z: 1} - m_Center: {x: 0, y: 0.54, z: 0} ---- !u!114 &849256364 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 849256358} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fbadb65558c0b1a48b58b765317ed874, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &849256365 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 849256358} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3} - m_Name: - m_EditorClassIdentifier: - GlobalObjectIdHash: 2133187149 - InScenePlacedSourceGlobalObjectIdHash: 0 - AlwaysReplicateAsRoot: 0 - SynchronizeTransform: 1 - ActiveSceneSynchronization: 0 - SceneMigrationSynchronization: 1 - SpawnWithObservers: 1 - DontDestroyWithOwner: 0 - AutoObjectParentSync: 1 ---- !u!1 &949745746 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 949745749} - - component: {fileID: 949745748} - - component: {fileID: 949745747} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &949745747 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 949745746} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Version: 3 - m_UsePipelineSettings: 1 - m_AdditionalLightsShadowResolutionTier: 2 - m_LightLayerMask: 1 - m_RenderingLayers: 1 - m_CustomShadowLayers: 0 - m_ShadowLayerMask: 1 - m_ShadowRenderingLayers: 1 - m_LightCookieSize: {x: 1, y: 1} - m_LightCookieOffset: {x: 0, y: 0} - m_SoftShadowQuality: 0 ---- !u!108 &949745748 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 949745746} - m_Enabled: 1 - serializedVersion: 10 - m_Type: 1 - m_Shape: 0 - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_InnerSpotAngle: 21.80208 - m_CookieSize: 10 - m_Shadows: - m_Type: 0 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_CullingMatrixOverride: - e00: 1 - e01: 0 - e02: 0 - e03: 0 - e10: 0 - e11: 1 - e12: 0 - e13: 0 - e20: 0 - e21: 0 - e22: 1 - e23: 0 - e30: 0 - e31: 0 - e32: 0 - e33: 1 - m_UseCullingMatrixOverride: 0 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingLayerMask: 1 - m_Lightmapping: 4 - m_LightShadowCasterMode: 0 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} - m_UseBoundingSphereOverride: 0 - m_UseViewFrustumForShadowCasterCull: 1 - m_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!4 &949745749 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 949745746} - serializedVersion: 2 - m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} ---- !u!1 &997499839 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 997499840} - - component: {fileID: 997499843} - - component: {fileID: 997499842} - - component: {fileID: 997499841} - - component: {fileID: 997499845} - - component: {fileID: 997499844} - - component: {fileID: 997499846} - m_Layer: 12 - m_Name: P (7) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!4 &997499840 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 997499839} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0.56, y: -9.36, z: 1.62} - m_LocalScale: {x: 2, y: 18.606562, z: 2} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 286165427} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!65 &997499841 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 997499839} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &997499842 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 997499839} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 3fe7389b2cbe4f2408a82aac5438ac50, 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: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &997499843 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 997499839} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!65 &997499844 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 997499839} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 1 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 0.08, z: 1} - m_Center: {x: 0, y: 0.54, z: 0} ---- !u!114 &997499845 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 997499839} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fbadb65558c0b1a48b58b765317ed874, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &997499846 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 997499839} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3} - m_Name: - m_EditorClassIdentifier: - GlobalObjectIdHash: 2541096383 - InScenePlacedSourceGlobalObjectIdHash: 0 - AlwaysReplicateAsRoot: 0 - SynchronizeTransform: 1 - ActiveSceneSynchronization: 0 - SceneMigrationSynchronization: 1 - SpawnWithObservers: 1 - DontDestroyWithOwner: 0 - AutoObjectParentSync: 1 ---- !u!1 &1146060681 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1146060682} - - component: {fileID: 1146060685} - - component: {fileID: 1146060684} - - component: {fileID: 1146060687} - - component: {fileID: 1146060686} - - component: {fileID: 1146060688} - m_Layer: 12 - m_Name: P (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!4 &1146060682 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1146060681} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -2.75, y: -9.36, z: 4.29} - m_LocalScale: {x: 2, y: 18.606562, z: 2} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 286165427} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!23 &1146060684 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1146060681} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: a2832164335141e429d567fbed8daa03, 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: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1146060685 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1146060681} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!65 &1146060686 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1146060681} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 1 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 0.08, z: 1} - m_Center: {x: 0, y: 0.54, z: 0} ---- !u!114 &1146060687 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1146060681} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fbadb65558c0b1a48b58b765317ed874, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &1146060688 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1146060681} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3} - m_Name: - m_EditorClassIdentifier: - GlobalObjectIdHash: 4024356049 - InScenePlacedSourceGlobalObjectIdHash: 0 - AlwaysReplicateAsRoot: 0 - SynchronizeTransform: 1 - ActiveSceneSynchronization: 0 - SceneMigrationSynchronization: 1 - SpawnWithObservers: 1 - DontDestroyWithOwner: 0 - AutoObjectParentSync: 1 ---- !u!1 &1415641637 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1415641641} - - component: {fileID: 1415641640} - - component: {fileID: 1415641639} - - component: {fileID: 1415641638} - m_Layer: 8 - m_Name: Plane - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!64 &1415641638 -MeshCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1415641637} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 5 - m_Convex: 0 - m_CookingOptions: 30 - m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &1415641639 + serializedVersion: 5 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &1415641639 MeshRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -1220,330 +425,6 @@ Transform: m_Children: [] m_Father: {fileID: 286165427} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1463337822 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1463337823} - - component: {fileID: 1463337826} - - component: {fileID: 1463337825} - - component: {fileID: 1463337824} - - component: {fileID: 1463337828} - - component: {fileID: 1463337827} - - component: {fileID: 1463337829} - m_Layer: 12 - m_Name: P (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!4 &1463337823 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1463337822} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 4.18, y: -9.36, z: -0.86} - m_LocalScale: {x: 2, y: 18.606562, z: 2} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 286165427} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!65 &1463337824 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1463337822} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &1463337825 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1463337822} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: a2832164335141e429d567fbed8daa03, 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: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1463337826 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1463337822} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!65 &1463337827 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1463337822} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 1 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 0.08, z: 1} - m_Center: {x: 0, y: 0.54, z: 0} ---- !u!114 &1463337828 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1463337822} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fbadb65558c0b1a48b58b765317ed874, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &1463337829 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1463337822} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3} - m_Name: - m_EditorClassIdentifier: - GlobalObjectIdHash: 3652105053 - InScenePlacedSourceGlobalObjectIdHash: 0 - AlwaysReplicateAsRoot: 0 - SynchronizeTransform: 1 - ActiveSceneSynchronization: 0 - SceneMigrationSynchronization: 1 - SpawnWithObservers: 1 - DontDestroyWithOwner: 0 - AutoObjectParentSync: 1 ---- !u!1 &1620155724 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1620155725} - - component: {fileID: 1620155728} - - component: {fileID: 1620155727} - - component: {fileID: 1620155726} - - component: {fileID: 1620155730} - - component: {fileID: 1620155729} - - component: {fileID: 1620155731} - m_Layer: 12 - m_Name: P (5) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!4 &1620155725 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1620155724} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -3.32, y: -9.36, z: -0.7} - m_LocalScale: {x: 2, y: 18.606562, z: 2} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 286165427} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!65 &1620155726 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1620155724} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &1620155727 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1620155724} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: a2832164335141e429d567fbed8daa03, 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: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1620155728 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1620155724} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!65 &1620155729 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1620155724} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 1 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 0.08, z: 1} - m_Center: {x: 0, y: 0.54, z: 0} ---- !u!114 &1620155730 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1620155724} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fbadb65558c0b1a48b58b765317ed874, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &1620155731 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1620155724} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3} - m_Name: - m_EditorClassIdentifier: - GlobalObjectIdHash: 3970869814 - InScenePlacedSourceGlobalObjectIdHash: 0 - AlwaysReplicateAsRoot: 0 - SynchronizeTransform: 1 - ActiveSceneSynchronization: 0 - SceneMigrationSynchronization: 1 - SpawnWithObservers: 1 - DontDestroyWithOwner: 0 - AutoObjectParentSync: 1 --- !u!1 &2085312385 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Gameplay/PlatformManager.cs b/Assets/Scripts/Gameplay/PlatformManager.cs index 31d36d9..4713a54 100644 --- a/Assets/Scripts/Gameplay/PlatformManager.cs +++ b/Assets/Scripts/Gameplay/PlatformManager.cs @@ -31,7 +31,6 @@ namespace Unity.Multiplayer.Samples.BossRoom { m_Platforms = GetComponentsInChildren().ToList(); - // Assign unique IDs to each platform for (int i = 0; i < m_Platforms.Count; i++) { m_Platforms[i].AssignID(i + 1); // IDs start from 1 @@ -43,44 +42,22 @@ namespace Unity.Multiplayer.Samples.BossRoom } void Starter() { - numberOfPlayers = PlayerPrefs.GetInt("NumberOfLobbyPlayers"); - int platformsToSpawn = numberOfPlayers - 1; + int platformsToSpawn = PlayerPrefs.GetInt("NumberOfLobbyPlayers") - 1; + if (platformsToSpawn <= 0) return; - if (platformsToSpawn <= 0) - { - Debug.LogWarning("Not enough players to spawn platforms."); - return; - } - for(int i=0;i < m_Platforms.Count;i++) - { - m_Platforms[i].gameObject.SetActive(false); - } - for(int i=0;i platform.gameObject.SetActive(false)); + for (int i = 0; i < platformsToSpawn; i++) m_Platforms[i].gameObject.SetActive(true); + m_Platforms = m_Platforms.Where(p => p.gameObject.activeInHierarchy).ToList(); + float angleIncrement = 360f / platformsToSpawn; for (int i = 0; i < platformsToSpawn; i++) - { - // Calculate angle in radians - float angle = i * angleIncrement * Mathf.Deg2Rad; - - // Determine the position on the circular plane - Vector3 position = new Vector3( - Mathf.Cos(angle) * planeRadius, - 0f, // Assume the circular plane is on the XZ plane - Mathf.Sin(angle) * planeRadius + m_Platforms[i].transform.position = new Vector3( + Mathf.Cos(i * angleIncrement * Mathf.Deg2Rad) * planeRadius, + 0f, + Mathf.Sin(i * angleIncrement * Mathf.Deg2Rad) * planeRadius ); - - // Instantiate the platform - m_Platforms[i].transform.position = position; - m_Platforms[i].gameObject.SetActive(true); - //m_Platforms[i].AnimationStarter(); - - //Instantiate(platformPrefab, position, Quaternion.identity); - } } + public Platform FindNearestUnoccupiedPlatform(Vector3 position) { if (!IsServer) diff --git a/Assets/Scripts/Gameplay/PlayerScoreComponent.cs b/Assets/Scripts/Gameplay/PlayerScoreComponent.cs index 2e87ce3..7adb20b 100644 --- a/Assets/Scripts/Gameplay/PlayerScoreComponent.cs +++ b/Assets/Scripts/Gameplay/PlayerScoreComponent.cs @@ -35,9 +35,8 @@ public class PlayerScoreComponent : NetworkBehaviour // Update the player's score display in the UI. Debug.Log($"[PlayerScoreComponent] Updated score UI for Player {OwnerClientId}: {CurrentScore}"); } - private void OnDestroy() - { - Destroy(playerItem.gameObject); - Scoreboard.instance.DestroyChecker(); - } + //private void OnDestroy() + //{ + // Destroy(playerItem.gameObject); + //} } diff --git a/Assets/Scripts/Gameplay/ScoreManager.cs b/Assets/Scripts/Gameplay/ScoreManager.cs index 39f4e59..df301f8 100644 --- a/Assets/Scripts/Gameplay/ScoreManager.cs +++ b/Assets/Scripts/Gameplay/ScoreManager.cs @@ -25,22 +25,26 @@ public class ScoreManager : NetworkBehaviour { if (IsServer) { + //foreach (var clientId in NetworkManager.Singleton.ConnectedClientsIds) + //{ + // //InitializePlayerScoreServerRpc(clientId, $"Player_{clientId}"); + // InitializePlayerScoreServerRpc(clientId, player"); + //} StartCrowPenaltyCoroutineServerRpc(); } } [ServerRpc(RequireOwnership = false)] - public void InitializePlayerScoreServerRpc(ulong ownerClientId,string name) + public void InitializePlayerScoreServerRpc(ulong ownerClientId, string name) { if (!playerScores.ContainsKey(ownerClientId)) { playerScores[ownerClientId] = 200; - Debug.Log($"[ScoreManager] Player {ownerClientId} initialized with a starting score of 200."); - UpdatePlayerScoreClientRpc(ownerClientId, 200); - playerNames[ownerClientId]= name; - - Scoreboard.instance.ScoreBoardItemInitializer(ownerClientId, playerScores[ownerClientId],name); + playerNames[ownerClientId] = name; + Debug.Log($"[ScoreManager] Player {ownerClientId} initialized with a starting score of 200 and name '{name}'."); + Scoreboard.instance.ScoreBoardItemInitializer(ownerClientId, playerScores[ownerClientId], name); + UpdatePlayerScoreClientRpc(ownerClientId, 200); } else { @@ -48,13 +52,11 @@ public class ScoreManager : NetworkBehaviour } } - public void UpdatePlayerScore(ulong ownerClientId, int newScore) { if (playerScores.ContainsKey(ownerClientId)) { playerScores[ownerClientId] = newScore; - Scoreboard.instance.ScoreBoardUpdater(ownerClientId, newScore); Debug.Log($"[ScoreManager] Updating Player {ownerClientId} score to {newScore}."); UpdatePlayerScoreClientRpc(ownerClientId, newScore); } @@ -63,45 +65,38 @@ public class ScoreManager : NetworkBehaviour Debug.LogError($"[ScoreManager] No entry found for Player {ownerClientId}. Cannot update score."); } } - - public void AddPlayerScore(ulong ownerClientId, int newScore) + + [ClientRpc] + public void UpdatePlayerScoreClientRpc(ulong ownerClientId, int newScore) { - if (playerScores.ContainsKey(ownerClientId)) + if (playerNames.ContainsKey(ownerClientId)) { - playerScores[ownerClientId] += newScore; - Debug.Log($"[ScoreManager] Updating Player {ownerClientId} score to {playerScores[ownerClientId]}."); - UpdatePlayerScoreClientRpc(ownerClientId, playerScores[ownerClientId]); + string playerName = playerNames[ownerClientId]; + Debug.Log($"[ScoreManager] Received score update for Player {ownerClientId} (Name: {playerName}): {newScore}"); + Scoreboard.instance.ScoreBoardUpdater(playerName, newScore); } else { - Debug.LogError($"[ScoreManager] No entry found for Player {ownerClientId}. Cannot update score."); + Debug.LogError($"[ScoreManager] Player name not found for Player {ownerClientId}. Cannot update scoreboard."); } } - - public void SubtractPlayerScore(ulong ownerClientId, int scoreToSubtract) + + public void AddPlayerScore(ulong ownerClientId, int scoreToAdd) { if (playerScores.ContainsKey(ownerClientId)) { - int value = Mathf.Max(0, playerScores[ownerClientId] - scoreToSubtract); - playerScores[ownerClientId] = value; - Debug.Log($"[ScoreManager] Updating Player {ownerClientId} score to {playerScores[ownerClientId]}."); - UpdatePlayerScoreClientRpc(ownerClientId, playerScores[ownerClientId]); - } - else - { - Debug.LogError($"[ScoreManager] No entry found for Player {ownerClientId}. Cannot update score."); + playerScores[ownerClientId] += scoreToAdd; + UpdatePlayerScore(ownerClientId, playerScores[ownerClientId]); } } - - public int GetPlayerScore(ulong ownerClientId) + public void SubtractPlayerScore(ulong ownerClientId, int scoreToSubtract) { - if (playerScores.TryGetValue(ownerClientId, out var score)) + if (playerScores.ContainsKey(ownerClientId)) { - return score; + int newScore = Mathf.Max(0, playerScores[ownerClientId] - scoreToSubtract); + UpdatePlayerScore(ownerClientId, newScore); } - Debug.LogError($"[ScoreManager] No entry found for Player {ownerClientId}."); - return 0; // Default score } [ServerRpc] @@ -113,61 +108,198 @@ public class ScoreManager : NetworkBehaviour private IEnumerator ApplyCrowPenaltyCoroutine() { yield return new WaitUntil(() => PlatformManager.Instance != null && PlatformManager.Instance.AreAllPlatformsOccupied()); + while (true) { - var modifications = new List>(); - foreach (var entry in playerScores) { - var ownerClientId = entry.Key; - var score = entry.Value; + ulong ownerClientId = entry.Key; + int currentScore = entry.Value; - // Check if the player is the crow if (CrowManager.Instance != null && CrowManager.Instance.GetCurrentCrow().OwnerClientId == ownerClientId) { - var newScore = score - 2; - modifications.Add(new KeyValuePair(ownerClientId, newScore)); + int newScore = currentScore - 2; + SubtractPlayerScore(ownerClientId, 2); Debug.Log($"[ScoreManager] Applied crow penalty to Player {ownerClientId}. New score: {newScore}"); } } - - // Apply the modifications after the iteration - foreach (var modification in modifications) - { - UpdatePlayerScore(modification.Key, modification.Value); - } - - // Wait for the next penalty application yield return new WaitForSeconds(5f); } } - - [ClientRpc] - public void UpdatePlayerScoreClientRpc(ulong ownerClientId, int newScore) - { - Debug.Log($"[ScoreManager] Received score update for Player {ownerClientId}: {newScore}"); - var playerScoreComponent = FindPlayerScoreComponent(ownerClientId); - if (playerScoreComponent != null) - { - playerScoreComponent.UpdateScore(newScore); - } - else - { - Debug.LogError($"[ScoreManager] Could not find PlayerScoreComponent for Player {ownerClientId}"); - } - } +} - private PlayerScoreComponent FindPlayerScoreComponent(ulong ownerClientId) - { - foreach (var scoreComponent in FindObjectsOfType()) - { - if (scoreComponent.OwnerClientId == ownerClientId) - { - return scoreComponent; - } - } - Debug.LogError($"[ScoreManager] Could not find PlayerScoreComponent for Player {ownerClientId}"); - return null; - } -} +//using System.Collections; +//using System.Collections.Generic; +//using Unity.Multiplayer.Samples.BossRoom; +//using UnityEngine; +//using Unity.Netcode; + +//public class ScoreManager : NetworkBehaviour +//{ +// public static ScoreManager Instance { get; private set; } + +// public Dictionary playerScores = new Dictionary(); +// public Dictionary playerNames = new Dictionary(); + +// private void Awake() +// { +// if (Instance != null && Instance != this) +// { +// Destroy(gameObject); +// return; +// } +// Instance = this; +// } + +// public override void OnNetworkSpawn() +// { +// if (IsServer) +// { +// StartCrowPenaltyCoroutineServerRpc(); +// } +// } + +// [ServerRpc(RequireOwnership = false)] +// public void InitializePlayerScoreServerRpc(ulong ownerClientId,string name) +// { +// if (!playerScores.ContainsKey(ownerClientId)) +// { +// playerScores[ownerClientId] = 200; +// Debug.Log($"[ScoreManager] Player {ownerClientId} initialized with a starting score of 200."); +// UpdatePlayerScoreClientRpc(ownerClientId, 200); +// playerNames[ownerClientId]= name; + +// Scoreboard.instance.ScoreBoardItemInitializer(ownerClientId, playerScores[ownerClientId],name); + +// } +// else +// { +// Debug.LogWarning($"[ScoreManager] Player {ownerClientId} already initialized."); +// } +// } + + +// public void UpdatePlayerScore(ulong ownerClientId, int newScore) +// { +// if (playerScores.ContainsKey(ownerClientId)) +// { +// playerScores[ownerClientId] = newScore; +// Debug.Log($"[ScoreManager] Updating Player {ownerClientId} score to {newScore}."); +// UpdatePlayerScoreClientRpc(ownerClientId, newScore); +// } +// else +// { +// Debug.LogError($"[ScoreManager] No entry found for Player {ownerClientId}. Cannot update score."); +// } +// } + +// public void AddPlayerScore(ulong ownerClientId, int newScore) +// { +// if (playerScores.ContainsKey(ownerClientId)) +// { +// playerScores[ownerClientId] += newScore; +// Debug.Log($"[ScoreManager] Updating Player {ownerClientId} score to {playerScores[ownerClientId]}."); +// UpdatePlayerScoreClientRpc(ownerClientId, playerScores[ownerClientId]); +// } +// else +// { +// Debug.LogError($"[ScoreManager] No entry found for Player {ownerClientId}. Cannot update score."); +// } +// } + +// public void SubtractPlayerScore(ulong ownerClientId, int scoreToSubtract) +// { +// if (playerScores.ContainsKey(ownerClientId)) +// { +// int value = Mathf.Max(0, playerScores[ownerClientId] - scoreToSubtract); +// playerScores[ownerClientId] = value; +// Debug.Log($"[ScoreManager] Updating Player {ownerClientId} score to {playerScores[ownerClientId]}."); +// UpdatePlayerScoreClientRpc(ownerClientId, playerScores[ownerClientId]); +// } +// else +// { +// Debug.LogError($"[ScoreManager] No entry found for Player {ownerClientId}. Cannot update score."); +// } +// } + + +// public int GetPlayerScore(ulong ownerClientId) +// { +// if (playerScores.TryGetValue(ownerClientId, out var score)) +// { +// return score; +// } +// Debug.LogError($"[ScoreManager] No entry found for Player {ownerClientId}."); +// return 0; // Default score +// } + +// [ServerRpc] +// public void StartCrowPenaltyCoroutineServerRpc() +// { +// StartCoroutine(ApplyCrowPenaltyCoroutine()); +// } + +// private IEnumerator ApplyCrowPenaltyCoroutine() +// { +// yield return new WaitUntil(() => PlatformManager.Instance != null && PlatformManager.Instance.AreAllPlatformsOccupied()); +// while (true) +// { +// var modifications = new List>(); + +// foreach (var entry in playerScores) +// { +// var ownerClientId = entry.Key; +// var score = entry.Value; + +// // Check if the player is the crow +// if (CrowManager.Instance != null && CrowManager.Instance.GetCurrentCrow().OwnerClientId == ownerClientId) +// { +// var newScore = score - 2; +// modifications.Add(new KeyValuePair(ownerClientId, newScore)); +// Debug.Log($"[ScoreManager] Applied crow penalty to Player {ownerClientId}. New score: {newScore}"); +// } +// } + +// // Apply the modifications after the iteration +// foreach (var modification in modifications) +// { +// UpdatePlayerScore(modification.Key, modification.Value); +// } + +// // Wait for the next penalty application +// yield return new WaitForSeconds(5f); +// } +// } + +// [ClientRpc] +// public void UpdatePlayerScoreClientRpc(ulong ownerClientId, int newScore) +// { +// Debug.Log($"[ScoreManager] Received score update for Player {ownerClientId}: {newScore}"); +// Scoreboard.instance.ScoreBoardUpdater(playerNames[ownerClientId], newScore); + +// var playerScoreComponent = FindPlayerScoreComponent(ownerClientId); +// if (playerScoreComponent != null) +// { +// playerScoreComponent.UpdateScore(newScore); +// } +// else +// { +// Debug.LogError($"[ScoreManager] Could not find PlayerScoreComponent for Player {ownerClientId}"); +// } +// } + + +// private PlayerScoreComponent FindPlayerScoreComponent(ulong ownerClientId) +// { +// foreach (var scoreComponent in FindObjectsOfType()) +// { +// if (scoreComponent.OwnerClientId == ownerClientId) +// { +// return scoreComponent; +// } +// } +// Debug.LogError($"[ScoreManager] Could not find PlayerScoreComponent for Player {ownerClientId}"); +// return null; +// } +//} diff --git a/Assets/Scripts/Gameplay/Scoreboard.cs b/Assets/Scripts/Gameplay/Scoreboard.cs index 51cd7c2..1bf6d08 100644 --- a/Assets/Scripts/Gameplay/Scoreboard.cs +++ b/Assets/Scripts/Gameplay/Scoreboard.cs @@ -2,158 +2,77 @@ using System.Collections; using System.Collections.Generic; using Unity.Multiplayer.Samples.BossRoom; using UnityEngine; -using Unity.BossRoom.Gameplay.GameState; using Unity.Netcode; -using VContainer.Unity; public class Scoreboard : NetworkBehaviour { - public List m_PlayerScoreComponents; - public List playerItems; + public List playerItems = new(); public GameObject playerItemPrefab; - public Transform Parent; - public Transform FinalParent; - int index = 0; - bool coroutineStarter = false; - public static Scoreboard instance; + public Transform Parent, FinalParent; public GameObject FinalLeaderBoardObj; + public static Scoreboard instance; + private bool coroutineStarter = false; - private void Awake() + private void Awake() => instance = this; + public void ScoreBoardItemInitializer(ulong clientId, int score, string name) { - instance = this; - } - - public void DestroyChecker() - { - for (int i = 0; i < m_PlayerScoreComponents.Count; i++) - { - if (m_PlayerScoreComponents[i] == null) - { - m_PlayerScoreComponents.RemoveAt(i); - } - } - for (int i = 0; i < playerItems.Count; i++) - { - if (playerItems[i] == null) - { - playerItems.RemoveAt(i); - } - } - } - public void ScoreBoardListFiller(NetworkObject playerObj) - { - if (IsServer) - { - ulong clientId = playerObj.OwnerClientId; - int initialScore = ScoreManager.Instance.GetPlayerScore(clientId); - m_PlayerScoreComponents.Add(playerObj.GetComponent()); - m_PlayerScoreComponents[m_PlayerScoreComponents.Count - 1].m_index = index; - - // Synchronize across clients - InstantiatePlayerItemClientRpc(index, clientId, initialScore); - - index++; - } + if (IsServer) ScoreBoardItemInitializerClientRpc(clientId, score, name); } [ClientRpc] - public void InstantiatePlayerItemClientRpc(int index, ulong clientId, int currentScore) + public void ScoreBoardItemInitializerClientRpc(ulong clientId, int score, string name) { - GameObject temp = Instantiate(playerItemPrefab, Parent); - PlayerItem item = temp.GetComponent(); - item.PlayerName.text = clientId.ToString(); - item.PlayerScore.text = currentScore.ToString(); + var item = Instantiate(playerItemPrefab, Parent).GetComponent(); + item.PlayerName.text = name; + item.PlayerScore.text = score.ToString(); playerItems.Add(item); } - [ClientRpc] - public void ScoreBoardItemInitializerClientRpc(ulong id, int score,string name) + public void ScoreBoardUpdater(string playerName, int score) { - playerItems.Add(Instantiate(playerItemPrefab, Parent).GetComponent()); - playerItems[^1].PlayerName.text = name.ToString(); - playerItems[^1].PlayerScore.text = score.ToString(); + if (IsServer) ScoreBoardUpdaterClientRpc(playerName, score); } - public void ScoreBoardItemInitializer(ulong id, int score,string name) - { - if (IsServer) - { - ScoreBoardItemInitializerClientRpc(id, score,name); // Send to clients - } - } - [ClientRpc] - public void ScoreBoardUpdaterClientRpc(ulong id, int score) + [ClientRpc] + public void ScoreBoardUpdaterClientRpc(string playerName, int score, ClientRpcParams clientRpcParams = default) { - for (int i = 0; i < playerItems.Count; i++) + foreach (var item in playerItems) { - if (playerItems[i].PlayerName.text == id.ToString()) + if (item.PlayerName.text == playerName) { - playerItems[i].PlayerScore.text = score.ToString(); + item.PlayerScore.text = score.ToString(); + break; } } + SortAndUpdateScoreboard(); } public void FinalLeaderBoard() { - Debug.Log("FinalLeaderBoard"); - if (IsServer) - { - FinalLeaderBoardClientRPC(); - } + if (IsServer) FinalLeaderBoardClientRPC(); } [ClientRpc] public void FinalLeaderBoardClientRPC() { - for (int i = 0; i < playerItems.Count; i++) - { - Instantiate(playerItems[i], FinalParent); - } + playerItems.ForEach(item => Instantiate(item.gameObject, FinalParent)); FinalLeaderBoardObj.SetActive(true); } - public void ScoreBoardUpdater(ulong id, int score) - { - if (IsServer) - { - ScoreBoardUpdaterClientRpc(id, score); // Send to all clients - } - } - public void Starter() + private void SortAndUpdateScoreboard() { - // Start the coroutine for updating the scores - StartCoroutine(ScoreUpdater()); + playerItems.Sort((p1, p2) => int.Parse(p2.PlayerScore.text).CompareTo(int.Parse(p1.PlayerScore.text))); + for (int i = 0; i < playerItems.Count; i++) playerItems[i].transform.SetSiblingIndex(i); } - - public void Instantiator(int index) + public void StartScoreUpdater() { - // Only instantiate UI elements on the client side - if (!NetworkManager.Singleton.IsClient) + if (!coroutineStarter) { - Debug.LogError("Instantiator called on server, should be on client"); - return; + coroutineStarter = true; + StartCoroutine(ScoreUpdater()); } - - Debug.Log("Instantiator called on client"); - - GameObject temp = Instantiate(playerItemPrefab, Parent); - PlayerItem item = temp.GetComponent(); - m_PlayerScoreComponents[m_PlayerScoreComponents.Count - 1].playerItem = item; - playerItems.Add(item); - - playerItems[playerItems.Count - 1].PlayerScore.text = m_PlayerScoreComponents[index].CurrentScore.ToString(); - playerItems[playerItems.Count - 1].PlayerName.text = m_PlayerScoreComponents[index].serverCharacter.uIStateDisplayHandler.m_UIState.playerName.ToString(); } - - IEnumerator ScoreUpdater() + private IEnumerator ScoreUpdater() { - //yield return new WaitForSeconds(0.5f); - Debug.Log("Scoreboard Start - ScoreUpdater started"); - yield return new WaitUntil(() => coroutineStarter == true); + yield return new WaitUntil(() => coroutineStarter); while (true) { - if (IsOwner) - { - yield return new WaitForSeconds(0.1f); - //m_PlayerScoreComponents.Sort((p1, p2) => p2.CurrentScore.CompareTo(p1.CurrentScore)); - playerItems.Sort((p1, p2) => p2.PlayerScore.GetParsedText().CompareTo(p1.PlayerScore.GetParsedText())); - for (int i = 0; i < playerItems.Count; i++) - playerItems[i].transform.SetSiblingIndex(m_PlayerScoreComponents[i].m_index); - } + SortAndUpdateScoreboard(); + yield return new WaitForSeconds(0.5f); } } }