diff --git a/Assets/3D Laboratory Environment with Appratus/Materials/Laboratory03_Floor_BaseMap.mat b/Assets/3D Laboratory Environment with Appratus/Materials/Laboratory03_Floor_BaseMap.mat
index 5edb1b1..0c08038 100644
--- a/Assets/3D Laboratory Environment with Appratus/Materials/Laboratory03_Floor_BaseMap.mat
+++ b/Assets/3D Laboratory Environment with Appratus/Materials/Laboratory03_Floor_BaseMap.mat
@@ -162,9 +162,9 @@ Material:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EchoColor: {r: 4, g: 3.026, b: 1.049, a: 1}
- _EchoCoreColor: {r: 7.5, g: 5.5, b: 2.2, a: 1}
- - _EchoPosition1: {r: 2.2242002, g: 0.12999992, b: 40.5673, a: 1}
- - _EchoPosition2: {r: 0, g: 0, b: 14.193845, a: 1}
- - _EchoPosition3: {r: 0, g: 0, b: 14.193845, a: 1}
+ - _EchoPosition1: {r: 1.8514614, g: 0.12999992, b: 40.92091, a: 1}
+ - _EchoPosition2: {r: 1.4822614, g: 0.12999992, b: 39.66953, a: 1}
+ - _EchoPosition3: {r: 1.9371727, g: 0.12999992, b: 38.718243, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
- _WaveCenter: {r: 0, g: 0, b: 0, a: 0}
diff --git a/Assets/3D Laboratory Environment with Appratus/Materials/Laboratory03_Glass_BaseMap 1.mat b/Assets/3D Laboratory Environment with Appratus/Materials/Laboratory03_Glass_BaseMap 1.mat
index 3b61352..63f1a00 100644
--- a/Assets/3D Laboratory Environment with Appratus/Materials/Laboratory03_Glass_BaseMap 1.mat
+++ b/Assets/3D Laboratory Environment with Appratus/Materials/Laboratory03_Glass_BaseMap 1.mat
@@ -144,9 +144,9 @@ Material:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EchoColor: {r: 4, g: 3.026, b: 1.049, a: 1}
- _EchoCoreColor: {r: 7.5, g: 5.5, b: 2.2, a: 1}
- - _EchoPosition1: {r: 2.2242002, g: 0.12999992, b: 40.5673, a: 1}
- - _EchoPosition2: {r: 0, g: 0, b: 14.193845, a: 1}
- - _EchoPosition3: {r: 0, g: 0, b: 14.193845, a: 1}
+ - _EchoPosition1: {r: 0.8146084, g: 1.18, b: 30.06276, a: 1}
+ - _EchoPosition2: {r: 0.8146084, g: 1.18, b: 30.06276, a: 1}
+ - _EchoPosition3: {r: 0.8146084, g: 1.18, b: 30.06276, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
- _WaveCenter: {r: 0, g: 0, b: 0, a: 0}
diff --git a/Assets/3D Laboratory Environment with Appratus/Materials/Laboratory03_Glass_BaseMap.mat b/Assets/3D Laboratory Environment with Appratus/Materials/Laboratory03_Glass_BaseMap.mat
index 2783cf7..50af68d 100644
--- a/Assets/3D Laboratory Environment with Appratus/Materials/Laboratory03_Glass_BaseMap.mat
+++ b/Assets/3D Laboratory Environment with Appratus/Materials/Laboratory03_Glass_BaseMap.mat
@@ -147,9 +147,9 @@ Material:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EchoColor: {r: 4, g: 3.026, b: 1.049, a: 1}
- _EchoCoreColor: {r: 7.5, g: 5.5, b: 2.2, a: 1}
- - _EchoPosition1: {r: 2.2242002, g: 0.12999992, b: 40.5673, a: 1}
- - _EchoPosition2: {r: 0, g: 0, b: 14.193845, a: 1}
- - _EchoPosition3: {r: 0, g: 0, b: 14.193845, a: 1}
+ - _EchoPosition1: {r: 0.8146084, g: 1.18, b: 30.06276, a: 1}
+ - _EchoPosition2: {r: 0.8146084, g: 1.18, b: 30.06276, a: 1}
+ - _EchoPosition3: {r: 0.8146084, g: 1.18, b: 30.06276, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
- _WaveCenter: {r: 0, g: 0, b: 0, a: 0}
diff --git a/Assets/3D Laboratory Environment with Appratus/Materials/Laboratory03_Other_01_BaseMap.mat b/Assets/3D Laboratory Environment with Appratus/Materials/Laboratory03_Other_01_BaseMap.mat
index c70cdac..2b89fe3 100644
--- a/Assets/3D Laboratory Environment with Appratus/Materials/Laboratory03_Other_01_BaseMap.mat
+++ b/Assets/3D Laboratory Environment with Appratus/Materials/Laboratory03_Other_01_BaseMap.mat
@@ -162,9 +162,9 @@ Material:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EchoColor: {r: 4, g: 3.026, b: 1.049, a: 1}
- _EchoCoreColor: {r: 7.5, g: 5.5, b: 2.2, a: 1}
- - _EchoPosition1: {r: 2.2242002, g: 0.12999992, b: 40.5673, a: 1}
- - _EchoPosition2: {r: 0, g: 0, b: 14.193845, a: 1}
- - _EchoPosition3: {r: 0, g: 0, b: 14.193845, a: 1}
+ - _EchoPosition1: {r: 1.8514614, g: 0.12999992, b: 40.92091, a: 1}
+ - _EchoPosition2: {r: 1.4822614, g: 0.12999992, b: 39.66953, a: 1}
+ - _EchoPosition3: {r: 1.9371727, g: 0.12999992, b: 38.718243, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
- _WaveCenter: {r: 0, g: 0, b: 0, a: 0}
diff --git a/Assets/3D Laboratory Environment with Appratus/Materials/Laboratory03_Others_BaseMap.mat b/Assets/3D Laboratory Environment with Appratus/Materials/Laboratory03_Others_BaseMap.mat
index 3c6d078..cc58146 100644
--- a/Assets/3D Laboratory Environment with Appratus/Materials/Laboratory03_Others_BaseMap.mat
+++ b/Assets/3D Laboratory Environment with Appratus/Materials/Laboratory03_Others_BaseMap.mat
@@ -149,9 +149,9 @@ Material:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EchoColor: {r: 4, g: 3.026, b: 1.049, a: 1}
- _EchoCoreColor: {r: 7.5, g: 5.5, b: 2.2, a: 1}
- - _EchoPosition1: {r: 2.2242002, g: 0.12999992, b: 40.5673, a: 1}
- - _EchoPosition2: {r: 0, g: 0, b: 14.193845, a: 1}
- - _EchoPosition3: {r: 0, g: 0, b: 14.193845, a: 1}
+ - _EchoPosition1: {r: 1.8514614, g: 0.12999992, b: 40.92091, a: 1}
+ - _EchoPosition2: {r: 1.4822614, g: 0.12999992, b: 39.66953, a: 1}
+ - _EchoPosition3: {r: 1.9371727, g: 0.12999992, b: 38.718243, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
- _WaveCenter: {r: 0, g: 0, b: 0, a: 0}
diff --git a/Assets/3D Laboratory Environment with Appratus/Materials/Laboratory03_Wood_BaseMap.mat b/Assets/3D Laboratory Environment with Appratus/Materials/Laboratory03_Wood_BaseMap.mat
index 521ae44..9504294 100644
--- a/Assets/3D Laboratory Environment with Appratus/Materials/Laboratory03_Wood_BaseMap.mat
+++ b/Assets/3D Laboratory Environment with Appratus/Materials/Laboratory03_Wood_BaseMap.mat
@@ -148,9 +148,9 @@ Material:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EchoColor: {r: 4, g: 3.026, b: 1.049, a: 1}
- _EchoCoreColor: {r: 7.5, g: 5.5, b: 2.2, a: 1}
- - _EchoPosition1: {r: 2.2242002, g: 0.12999992, b: 40.5673, a: 1}
- - _EchoPosition2: {r: 0, g: 0, b: 14.193845, a: 1}
- - _EchoPosition3: {r: 0, g: 0, b: 14.193845, a: 1}
+ - _EchoPosition1: {r: 0.8146084, g: 1.18, b: 30.06276, a: 1}
+ - _EchoPosition2: {r: 0.8146084, g: 1.18, b: 30.06276, a: 1}
+ - _EchoPosition3: {r: 0.8146084, g: 1.18, b: 30.06276, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
- _WaveCenter: {r: 0, g: 0, b: 0, a: 0}
diff --git a/Assets/3D Laboratory Environment with Appratus/Materials/lambert1.mat b/Assets/3D Laboratory Environment with Appratus/Materials/lambert1.mat
index 237df46..f77d1a2 100644
--- a/Assets/3D Laboratory Environment with Appratus/Materials/lambert1.mat
+++ b/Assets/3D Laboratory Environment with Appratus/Materials/lambert1.mat
@@ -110,9 +110,9 @@ Material:
- _Color: {r: 0, g: 0, b: 0, a: 1}
- _EchoColor: {r: 4, g: 3.026, b: 1.049, a: 1}
- _EchoCoreColor: {r: 7.5, g: 5.5, b: 2.2, a: 1}
- - _EchoPosition1: {r: 2.2242002, g: 0.12999992, b: 40.5673, a: 1}
- - _EchoPosition2: {r: 0, g: 0, b: 14.193845, a: 1}
- - _EchoPosition3: {r: 0, g: 0, b: 14.193845, a: 1}
+ - _EchoPosition1: {r: 1.8514614, g: 0.12999992, b: 40.92091, a: 1}
+ - _EchoPosition2: {r: 1.4822614, g: 0.12999992, b: 39.66953, a: 1}
+ - _EchoPosition3: {r: 1.9371727, g: 0.12999992, b: 38.718243, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _WaveCenter: {r: 0, g: 0, b: 0, a: 0}
m_BuildTextureStacks: []
diff --git a/Assets/EchoCloudMat.mat b/Assets/EchoCloudMat.mat
index 6358675..9052465 100644
--- a/Assets/EchoCloudMat.mat
+++ b/Assets/EchoCloudMat.mat
@@ -87,9 +87,9 @@ Material:
- _BaseColor: {r: 0.015, g: 0.015, b: 0.02, a: 1}
- _EchoColor: {r: 4, g: 3.026, b: 1.049, a: 1}
- _EchoCoreColor: {r: 7.5, g: 5.5, b: 2.2, a: 1}
- - _EchoPosition1: {r: 2.2242002, g: 0.12999992, b: 40.5673, a: 1}
- - _EchoPosition2: {r: 0, g: 0, b: 14.193845, a: 1}
- - _EchoPosition3: {r: 0, g: 0, b: 14.193845, a: 1}
+ - _EchoPosition1: {r: 0.8146084, g: 1.18, b: 30.06276, a: 1}
+ - _EchoPosition2: {r: 0.8146084, g: 1.18, b: 30.06276, a: 1}
+ - _EchoPosition3: {r: 0.8146084, g: 1.18, b: 30.06276, a: 1}
- _WaveCenter: {r: 0, g: 0, b: 0, a: 0}
m_BuildTextureStacks: []
m_AllowLocking: 1
diff --git a/Assets/Scenes/Level2.unity b/Assets/Scenes/Level2.unity
new file mode 100644
index 0000000..ef47a43
Binary files /dev/null and b/Assets/Scenes/Level2.unity differ
diff --git a/Assets/Scenes/Level2.unity.meta b/Assets/Scenes/Level2.unity.meta
new file mode 100644
index 0000000..69f336e
--- /dev/null
+++ b/Assets/Scenes/Level2.unity.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 7af213749bf7d8545a574025643ac52f
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scenes/MainMenu.unity b/Assets/Scenes/MainMenu.unity
index aa991e3..c4bcba1 100644
--- a/Assets/Scenes/MainMenu.unity
+++ b/Assets/Scenes/MainMenu.unity
@@ -272,81 +272,6 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 640, y: 220}
m_Pivot: {x: 0.5, y: 0.5}
---- !u!1 &28648154
-GameObject:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- serializedVersion: 6
- m_Component:
- - component: {fileID: 28648155}
- - component: {fileID: 28648157}
- - component: {fileID: 28648156}
- m_Layer: 0
- m_Name: Crosshair_H
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!224 &28648155
-RectTransform:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 28648154}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_ConstrainProportionsScale: 0
- m_Children: []
- m_Father: {fileID: 476238123}
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
- m_AnchorMin: {x: 0.5, y: 0.5}
- m_AnchorMax: {x: 0.5, y: 0.5}
- m_AnchoredPosition: {x: 0, y: 0}
- m_SizeDelta: {x: 220, y: 1.5}
- m_Pivot: {x: 0.5, y: 0.5}
---- !u!114 &28648156
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 28648154}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
- m_Name:
- m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
- m_Material: {fileID: 0}
- m_Color: {r: 1, g: 0.85, b: 0.1, a: 0.25}
- m_RaycastTarget: 1
- m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
- m_Maskable: 1
- m_OnCullStateChanged:
- m_PersistentCalls:
- m_Calls: []
- m_Sprite: {fileID: 0}
- m_Type: 0
- m_PreserveAspect: 0
- m_FillCenter: 1
- m_FillMethod: 4
- m_FillAmount: 1
- m_FillClockwise: 1
- m_FillOrigin: 0
- m_UseSpriteMesh: 0
- m_PixelsPerUnitMultiplier: 1
---- !u!222 &28648157
-CanvasRenderer:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 28648154}
- m_CullTransparentMesh: 1
--- !u!1 &49175960
GameObject:
m_ObjectHideFlags: 0
@@ -1315,81 +1240,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 359650858}
m_CullTransparentMesh: 1
---- !u!1 &369535200
-GameObject:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- serializedVersion: 6
- m_Component:
- - component: {fileID: 369535201}
- - component: {fileID: 369535203}
- - component: {fileID: 369535202}
- m_Layer: 0
- m_Name: Radar_BeaconDot
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!224 &369535201
-RectTransform:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 369535200}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_ConstrainProportionsScale: 0
- m_Children: []
- m_Father: {fileID: 476238123}
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
- m_AnchorMin: {x: 0.5, y: 0.5}
- m_AnchorMax: {x: 0.5, y: 0.5}
- m_AnchoredPosition: {x: 0, y: 0}
- m_SizeDelta: {x: 14, y: 14}
- m_Pivot: {x: 0.5, y: 0.5}
---- !u!114 &369535202
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 369535200}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
- m_Name:
- m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
- m_Material: {fileID: 0}
- m_Color: {r: 1, g: 0.92, b: 0.2, a: 1}
- m_RaycastTarget: 1
- m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
- m_Maskable: 1
- m_OnCullStateChanged:
- m_PersistentCalls:
- m_Calls: []
- m_Sprite: {fileID: 0}
- m_Type: 0
- m_PreserveAspect: 0
- m_FillCenter: 1
- m_FillMethod: 4
- m_FillAmount: 1
- m_FillClockwise: 1
- m_FillOrigin: 0
- m_UseSpriteMesh: 0
- m_PixelsPerUnitMultiplier: 1
---- !u!222 &369535203
-CanvasRenderer:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 369535200}
- m_CullTransparentMesh: 1
--- !u!1 &380986619
GameObject:
m_ObjectHideFlags: 0
@@ -1682,12 +1532,7 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
- m_Children:
- - {fileID: 2124938209}
- - {fileID: 1573194001}
- - {fileID: 28648155}
- - {fileID: 2100556429}
- - {fileID: 369535201}
+ m_Children: []
m_Father: {fileID: 1908515134}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
@@ -1707,17 +1552,17 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 27669377a9e37834c888101dec6dc187, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::MenuEcholocationRadar
- maxSimultaneousWaves: 4
- waveMaxRadius: 1600
- waveSpeed: 240
- waveSpawnInterval: 1.7
- initialThickness: 14
- maxThickness: 52
- waveBaseColor: {r: 1, g: 0.85, b: 0.1, a: 0.85}
- waveCoreColor: {r: 1, g: 0.98, b: 0.55, a: 1}
- beaconColor: {r: 1, g: 0.88, b: 0.15, a: 1}
- radarBeaconDot: {fileID: 369535202}
- radarReticle: {fileID: 2124938211}
+ maxSimultaneousWaves: 3
+ waveMaxRadius: 1800
+ waveSpeed: 180
+ waveSpawnInterval: 2.4
+ initialThickness: 110
+ maxThickness: 360
+ waveBaseColor: {r: 1, g: 0.82, b: 0.18, a: 0.4}
+ waveCoreColor: {r: 1, g: 0.94, b: 0.5, a: 0.65}
+ beaconColor: {r: 1, g: 0.88, b: 0.2, a: 0.85}
+ radarBeaconDot: {fileID: 0}
+ radarReticle: {fileID: 0}
--- !u!1 &479211098
GameObject:
m_ObjectHideFlags: 0
@@ -5508,81 +5353,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1559811256}
m_CullTransparentMesh: 1
---- !u!1 &1573194000
-GameObject:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- serializedVersion: 6
- m_Component:
- - component: {fileID: 1573194001}
- - component: {fileID: 1573194003}
- - component: {fileID: 1573194002}
- m_Layer: 0
- m_Name: Radar_ReticleInner
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!224 &1573194001
-RectTransform:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1573194000}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_ConstrainProportionsScale: 0
- m_Children: []
- m_Father: {fileID: 476238123}
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
- m_AnchorMin: {x: 0.5, y: 0.5}
- m_AnchorMax: {x: 0.5, y: 0.5}
- m_AnchoredPosition: {x: 0, y: 0}
- m_SizeDelta: {x: 90, y: 90}
- m_Pivot: {x: 0.5, y: 0.5}
---- !u!114 &1573194002
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1573194000}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
- m_Name:
- m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
- m_Material: {fileID: 0}
- m_Color: {r: 1, g: 0.85, b: 0.1, a: 0.08}
- m_RaycastTarget: 1
- m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
- m_Maskable: 1
- m_OnCullStateChanged:
- m_PersistentCalls:
- m_Calls: []
- m_Sprite: {fileID: 0}
- m_Type: 0
- m_PreserveAspect: 0
- m_FillCenter: 1
- m_FillMethod: 4
- m_FillAmount: 1
- m_FillClockwise: 1
- m_FillOrigin: 0
- m_UseSpriteMesh: 0
- m_PixelsPerUnitMultiplier: 1
---- !u!222 &1573194003
-CanvasRenderer:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1573194000}
- m_CullTransparentMesh: 1
--- !u!1 &1593550058
GameObject:
m_ObjectHideFlags: 0
@@ -7844,81 +7614,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2094966548}
m_CullTransparentMesh: 1
---- !u!1 &2100556428
-GameObject:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- serializedVersion: 6
- m_Component:
- - component: {fileID: 2100556429}
- - component: {fileID: 2100556431}
- - component: {fileID: 2100556430}
- m_Layer: 0
- m_Name: Crosshair_V
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!224 &2100556429
-RectTransform:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 2100556428}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_ConstrainProportionsScale: 0
- m_Children: []
- m_Father: {fileID: 476238123}
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
- m_AnchorMin: {x: 0.5, y: 0.5}
- m_AnchorMax: {x: 0.5, y: 0.5}
- m_AnchoredPosition: {x: 0, y: 0}
- m_SizeDelta: {x: 1.5, y: 220}
- m_Pivot: {x: 0.5, y: 0.5}
---- !u!114 &2100556430
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 2100556428}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
- m_Name:
- m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
- m_Material: {fileID: 0}
- m_Color: {r: 1, g: 0.85, b: 0.1, a: 0.25}
- m_RaycastTarget: 1
- m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
- m_Maskable: 1
- m_OnCullStateChanged:
- m_PersistentCalls:
- m_Calls: []
- m_Sprite: {fileID: 0}
- m_Type: 0
- m_PreserveAspect: 0
- m_FillCenter: 1
- m_FillMethod: 4
- m_FillAmount: 1
- m_FillClockwise: 1
- m_FillOrigin: 0
- m_UseSpriteMesh: 0
- m_PixelsPerUnitMultiplier: 1
---- !u!222 &2100556431
-CanvasRenderer:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 2100556428}
- m_CullTransparentMesh: 1
--- !u!1 &2119819752
GameObject:
m_ObjectHideFlags: 0
@@ -8009,97 +7704,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2119819752}
m_CullTransparentMesh: 1
---- !u!1 &2124938208
-GameObject:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- serializedVersion: 6
- m_Component:
- - component: {fileID: 2124938209}
- - component: {fileID: 2124938212}
- - component: {fileID: 2124938211}
- - component: {fileID: 2124938210}
- m_Layer: 0
- m_Name: Radar_ReticleOuter
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!224 &2124938209
-RectTransform:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 2124938208}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_ConstrainProportionsScale: 0
- m_Children: []
- m_Father: {fileID: 476238123}
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
- m_AnchorMin: {x: 0.5, y: 0.5}
- m_AnchorMax: {x: 0.5, y: 0.5}
- m_AnchoredPosition: {x: 0, y: 0}
- m_SizeDelta: {x: 180, y: 180}
- m_Pivot: {x: 0.5, y: 0.5}
---- !u!114 &2124938210
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 2124938208}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: e19747de3f5aca642ab2be37e372fb86, type: 3}
- m_Name:
- m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Outline
- m_EffectColor: {r: 1, g: 0.85, b: 0.1, a: 0.35}
- m_EffectDistance: {x: 1.5, y: -1.5}
- m_UseGraphicAlpha: 1
---- !u!114 &2124938211
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 2124938208}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
- m_Name:
- m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
- m_Material: {fileID: 0}
- m_Color: {r: 1, g: 0.85, b: 0.1, a: 0.2}
- m_RaycastTarget: 1
- m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
- m_Maskable: 1
- m_OnCullStateChanged:
- m_PersistentCalls:
- m_Calls: []
- m_Sprite: {fileID: 0}
- m_Type: 0
- m_PreserveAspect: 0
- m_FillCenter: 1
- m_FillMethod: 4
- m_FillAmount: 1
- m_FillClockwise: 1
- m_FillOrigin: 0
- m_UseSpriteMesh: 0
- m_PixelsPerUnitMultiplier: 1
---- !u!222 &2124938212
-CanvasRenderer:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 2124938208}
- m_CullTransparentMesh: 1
--- !u!1 &2126875622
GameObject:
m_ObjectHideFlags: 0
diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity
index 80a2ec1..556d80c 100644
Binary files a/Assets/Scenes/SampleScene.unity and b/Assets/Scenes/SampleScene.unity differ
diff --git a/Assets/Scripts/AcidPool.cs b/Assets/Scripts/AcidPool.cs
new file mode 100644
index 0000000..77baeac
--- /dev/null
+++ b/Assets/Scripts/AcidPool.cs
@@ -0,0 +1,139 @@
+using UnityEngine;
+
+///
+/// Токсичная лужа ядовитой слизи босса, оставшаяся после попадания плевка.
+/// Наносит периодический урон игроку при нахождении в зоне поражения и шипит.
+///
+public class AcidPool : MonoBehaviour
+{
+ public float damagePerSecond = 5f;
+ public float lifetime = 4.5f;
+ public float radius = 0.85f;
+
+ private float timer = 0f;
+ private PlayerHealth playerInPool = null;
+ private Light poolLight;
+ private System.Collections.Generic.List visualSplatterPieces = new System.Collections.Generic.List();
+
+ public static AcidPool Create(Vector3 position, float poolLifetime = 4.5f, float poolRadius = 0.85f)
+ {
+ GameObject go = new GameObject("Acid_Saliva_Splatter");
+ go.transform.position = position;
+
+ AcidPool pool = go.AddComponent();
+ pool.lifetime = poolLifetime;
+ pool.radius = poolRadius;
+ return pool;
+ }
+
+ private void Start()
+ {
+ // Сферический триггер для обнаружения игрока
+ SphereCollider sc = gameObject.AddComponent();
+ sc.isTrigger = true;
+ sc.radius = radius;
+
+ // Кислотно-зеленый токсичный материал слюны: влажный, глянцевый
+ Material salivaMat = new Material(Shader.Find("Universal Render Pipeline/Lit") ?? Shader.Find("Standard"));
+ salivaMat.color = new Color(0.28f, 0.9f, 0.18f, 0.75f);
+ salivaMat.EnableKeyword("_EMISSION");
+ salivaMat.SetColor("_EmissionColor", new Color(0.15f, 0.7f, 0.1f) * 1.1f);
+ if (salivaMat.HasProperty("_Smoothness")) salivaMat.SetFloat("_Smoothness", 0.95f);
+
+ // 1. Центральное влажное пятно слюны (ультратонкое, как реальный след жидкости)
+ GameObject mainPuddle = GameObject.CreatePrimitive(PrimitiveType.Cylinder);
+ mainPuddle.name = "Saliva_Center";
+ mainPuddle.transform.SetParent(transform, false);
+ mainPuddle.transform.localPosition = new Vector3(0f, 0.005f, 0f);
+ mainPuddle.transform.localScale = new Vector3(radius * 0.9f, 0.002f, radius * 0.9f);
+ Destroy(mainPuddle.GetComponent());
+ mainPuddle.GetComponent().material = salivaMat;
+ visualSplatterPieces.Add(mainPuddle.transform);
+
+ // 2. Мелкие органические капли-брызги вокруг центра (клякса превращается в естественный всплеск слюны)
+ Vector2[] splashOffsets = new Vector2[]
+ {
+ new Vector2(0.42f, 0.25f),
+ new Vector2(-0.38f, 0.32f),
+ new Vector2(0.15f, -0.45f),
+ new Vector2(-0.42f, -0.22f),
+ new Vector2(0.50f, -0.18f)
+ };
+
+ for (int i = 0; i < splashOffsets.Length; i++)
+ {
+ GameObject splash = GameObject.CreatePrimitive(PrimitiveType.Cylinder);
+ splash.name = $"Saliva_Droplet_{i + 1}";
+ splash.transform.SetParent(transform, false);
+ splash.transform.localPosition = new Vector3(splashOffsets[i].x * radius, 0.005f, splashOffsets[i].y * radius);
+ float dropScale = Random.Range(0.14f, 0.24f) * radius;
+ splash.transform.localScale = new Vector3(dropScale, 0.002f, dropScale * Random.Range(0.85f, 1.35f));
+ Destroy(splash.GetComponent());
+ splash.GetComponent().material = salivaMat;
+ visualSplatterPieces.Add(splash.transform);
+ }
+
+ // 3. Мягкий биолюминесцентный свет пятна
+ GameObject lightObj = new GameObject("AcidLight");
+ lightObj.transform.SetParent(transform, false);
+ lightObj.transform.localPosition = new Vector3(0f, 0.15f, 0f);
+ poolLight = lightObj.AddComponent();
+ poolLight.type = LightType.Point;
+ poolLight.color = new Color(0.3f, 1.0f, 0.2f);
+ poolLight.intensity = 0.75f;
+ poolLight.range = 1.8f;
+
+ // Звук шипения кислоты
+ GameAudioSynthesizer.PlayAcidHiss();
+ }
+
+ private void Update()
+ {
+ timer += Time.deltaTime;
+
+ // Нанесение периодического урона игроку в луже
+ if (playerInPool != null)
+ {
+ playerInPool.TakeDamage(damagePerSecond * Time.deltaTime);
+ }
+
+ // Плавное испарение слюны в конце жизни
+ float remaining = lifetime - timer;
+ if (remaining <= 1.0f)
+ {
+ float scaleRatio = Mathf.Clamp01(remaining);
+ foreach (var piece in visualSplatterPieces)
+ {
+ if (piece != null)
+ {
+ piece.localScale = new Vector3(piece.localScale.x * scaleRatio, 0.002f, piece.localScale.z * scaleRatio);
+ }
+ }
+ if (poolLight != null) poolLight.intensity = 0.75f * scaleRatio;
+ }
+
+ if (timer >= lifetime)
+ {
+ Destroy(gameObject);
+ }
+ }
+
+ private void OnTriggerEnter(Collider other)
+ {
+ if (other.CompareTag("Player") || other.GetComponentInParent() != null)
+ {
+ playerInPool = other.GetComponentInParent();
+ }
+ }
+
+ private void OnTriggerExit(Collider other)
+ {
+ if (other.CompareTag("Player") || other.GetComponentInParent() != null)
+ {
+ if (playerInPool == other.GetComponentInParent())
+ {
+ playerInPool = null;
+ }
+ }
+ }
+}
diff --git a/Assets/Scripts/AcidPool.cs.meta b/Assets/Scripts/AcidPool.cs.meta
new file mode 100644
index 0000000..d42b4fd
--- /dev/null
+++ b/Assets/Scripts/AcidPool.cs.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: b314eae641d5ab440968e39daa5fc032
\ No newline at end of file
diff --git a/Assets/Scripts/AcidProjectile.cs b/Assets/Scripts/AcidProjectile.cs
new file mode 100644
index 0000000..d1c9c63
--- /dev/null
+++ b/Assets/Scripts/AcidProjectile.cs
@@ -0,0 +1,192 @@
+using UnityEngine;
+
+///
+/// Снаряд ядовитого био-плевка Босса. Летит к игроку, при контакте наносит прямой урон,
+/// создает расширяющуюся акустическую волну эхолокации и оставляет токсичную кислотную лужу.
+///
+public class AcidProjectile : MonoBehaviour
+{
+ public float speed = 19f;
+ public float directDamage = 18f;
+ public float maxLifetime = 5f;
+ public bool isMainGlobule = true;
+
+ private Vector3 moveDirection;
+ private float lifeTimer = 0f;
+ private bool hasImpacted = false;
+
+ public static AcidProjectile Spawn(Vector3 startPos, Vector3 targetPos, float projSpeed = 19f, float damage = 18f, bool isMain = true, float spreadAngle = 0f)
+ {
+ GameObject go = new GameObject(isMain ? "Boss_Saliva_Globule" : "Boss_Saliva_Droplet");
+ go.transform.position = startPos;
+
+ Vector3 dir = (targetPos - startPos);
+ dir.y += 0.22f; // небольшая естественная баллистическая дуга плевка
+ if (spreadAngle > 0.01f)
+ {
+ float pitch = Random.Range(-spreadAngle, spreadAngle);
+ float yaw = Random.Range(-spreadAngle, spreadAngle);
+ dir = Quaternion.Euler(pitch, yaw, 0f) * dir;
+ }
+
+ Vector3 normDir = dir.normalized;
+ go.transform.rotation = Quaternion.LookRotation(normDir);
+
+ float baseScale = isMain ? 1f : 0.65f;
+
+ // 1. Формируем анатомическую вытянутую каплю слюны (а не плоскую кляксу)
+ // Основное каплевидное тело (вытянутое вдоль направления полета Z)
+ GameObject body = GameObject.CreatePrimitive(PrimitiveType.Sphere);
+ body.name = "Saliva_Body";
+ body.transform.SetParent(go.transform, false);
+ body.transform.localScale = new Vector3(0.08f, 0.08f, 0.34f) * baseScale;
+ body.transform.localPosition = Vector3.zero;
+
+ // Переднее утолщение капли слюны
+ GameObject head = GameObject.CreatePrimitive(PrimitiveType.Sphere);
+ head.name = "Saliva_Head";
+ head.transform.SetParent(go.transform, false);
+ head.transform.localScale = new Vector3(0.11f, 0.11f, 0.14f) * baseScale;
+ head.transform.localPosition = new Vector3(0f, 0f, 0.11f * baseScale);
+
+ // Хвостовая мелкая капелька слизи
+ GameObject tail = GameObject.CreatePrimitive(PrimitiveType.Sphere);
+ tail.name = "Saliva_Tail";
+ tail.transform.SetParent(go.transform, false);
+ tail.transform.localScale = new Vector3(0.05f, 0.05f, 0.08f) * baseScale;
+ tail.transform.localPosition = new Vector3(0f, 0f, -0.20f * baseScale);
+
+ Destroy(body.GetComponent());
+ Destroy(head.GetComponent());
+ Destroy(tail.GetComponent());
+
+ // Органический материал токсичной слюны: влажный, глянцевый, полупрозрачный
+ Material salivaMat = new Material(Shader.Find("Universal Render Pipeline/Lit") ?? Shader.Find("Standard"));
+ salivaMat.color = new Color(0.35f, 0.95f, 0.2f, 0.85f);
+ salivaMat.EnableKeyword("_EMISSION");
+ salivaMat.SetColor("_EmissionColor", new Color(0.2f, 0.85f, 0.15f) * 1.3f);
+ if (salivaMat.HasProperty("_Smoothness")) salivaMat.SetFloat("_Smoothness", 0.94f);
+
+ body.GetComponent().material = salivaMat;
+ head.GetComponent().material = salivaMat;
+ tail.GetComponent().material = salivaMat;
+
+ // 2. След летящей слюны (TrailRenderer) — нить тягучей слизи за летящим плевком
+ TrailRenderer trail = go.AddComponent();
+ trail.time = 0.20f;
+ trail.startWidth = 0.09f * baseScale;
+ trail.endWidth = 0.005f;
+ trail.minVertexDistance = 0.04f;
+
+ Material trailMat = new Material(Shader.Find("Sprites/Default") ?? Shader.Find("Universal Render Pipeline/Unlit"));
+ trailMat.color = new Color(0.4f, 0.95f, 0.25f, 0.7f);
+ trail.material = trailMat;
+
+ Gradient grad = new Gradient();
+ grad.SetKeys(
+ new GradientColorKey[] { new GradientColorKey(new Color(0.4f, 1f, 0.25f), 0f), new GradientColorKey(new Color(0.25f, 0.85f, 0.15f), 1f) },
+ new GradientAlphaKey[] { new GradientAlphaKey(0.75f, 0f), new GradientAlphaKey(0.0f, 1f) }
+ );
+ trail.colorGradient = grad;
+
+ // 3. Мягкая подсветка капли в полете
+ GameObject lightObj = new GameObject("SalivaGlow");
+ lightObj.transform.SetParent(go.transform, false);
+ Light l = lightObj.AddComponent();
+ l.type = LightType.Point;
+ l.color = new Color(0.35f, 1.0f, 0.25f);
+ l.intensity = isMain ? 0.9f : 0.5f;
+ l.range = isMain ? 2.0f : 1.2f;
+
+ // 4. Коллайдер-триггер на корневом объекте
+ SphereCollider col = go.AddComponent();
+ col.isTrigger = true;
+ col.radius = 0.13f * baseScale;
+
+ AcidProjectile proj = go.AddComponent();
+ proj.speed = projSpeed;
+ proj.directDamage = damage;
+ proj.isMainGlobule = isMain;
+ proj.moveDirection = normDir;
+
+ return proj;
+ }
+
+ private void Update()
+ {
+ if (hasImpacted) return;
+
+ lifeTimer += Time.deltaTime;
+ if (lifeTimer >= maxLifetime)
+ {
+ Destroy(gameObject);
+ return;
+ }
+
+ // Перемещение снаряда вперед с естественной баллистикой
+ moveDirection += Vector3.down * (4.0f * Time.deltaTime);
+ transform.position += moveDirection.normalized * (speed * Time.deltaTime);
+
+ // Поворот по вектору движения, чтобы капля летела кончиком вперед
+ if (moveDirection.sqrMagnitude > 0.001f)
+ {
+ transform.rotation = Quaternion.LookRotation(moveDirection);
+ }
+
+ // SphereCast вперед для точной регистрации удара на высокой скорости
+ if (Physics.SphereCast(transform.position, 0.12f, moveDirection, out RaycastHit hit, speed * Time.deltaTime, ~0, QueryTriggerInteraction.Ignore))
+ {
+ OnHit(hit.collider, hit.point);
+ }
+ }
+
+ private void OnTriggerEnter(Collider other)
+ {
+ if (hasImpacted) return;
+ if (other.GetComponentInParent() != null) return;
+ if (other.name.Contains("Saliva") || other.name.Contains("Acid")) return;
+
+ OnHit(other, transform.position);
+ }
+
+ private void OnHit(Collider hitCollider, Vector3 impactPoint)
+ {
+ if (hasImpacted) return;
+ hasImpacted = true;
+
+ // 1. Урон игроку при прямом попадании
+ PlayerHealth player = hitCollider.GetComponentInParent();
+ if (player != null)
+ {
+ player.TakeDamage(directDamage);
+ Debug.Log($"[Босс] Плевок слюны попал в игрока! Нанесено {directDamage} урона.");
+ }
+
+ // 2. Волна эхолокации в месте удара (жидкость ударяется о поверхность и разлетается брызгами)
+ if (EchoTrigger.Instance != null && isMainGlobule)
+ {
+ Vector3 echoPos = impactPoint;
+ if (Physics.Raycast(impactPoint + Vector3.up * 0.5f, Vector3.down, out RaycastHit floorHit, 4f))
+ {
+ echoPos = floorHit.point + Vector3.up * 0.05f;
+ }
+ EchoTrigger.Instance.TriggerExternalWave(echoPos, 14f, 1.8f);
+ }
+
+ // 3. Создание органического всплеска слюны на полу
+ if (isMainGlobule)
+ {
+ Vector3 poolPos = impactPoint;
+ if (Physics.Raycast(impactPoint + Vector3.up * 0.5f, Vector3.down, out RaycastHit fHit, 5f))
+ {
+ poolPos = fHit.point;
+ }
+ AcidPool.Create(poolPos, poolLifetime: 4.5f, poolRadius: 0.85f);
+ }
+
+ // 4. Звук смачного шлепка слюны о поверхность
+ GameAudioSynthesizer.PlayAcidImpact();
+
+ Destroy(gameObject);
+ }
+}
diff --git a/Assets/Scripts/AcidProjectile.cs.meta b/Assets/Scripts/AcidProjectile.cs.meta
new file mode 100644
index 0000000..a78bd88
--- /dev/null
+++ b/Assets/Scripts/AcidProjectile.cs.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: e4b1284fcd03cb541b889710748457aa
\ No newline at end of file
diff --git a/Assets/Scripts/AcousticJammerOverlay.cs b/Assets/Scripts/AcousticJammerOverlay.cs
new file mode 100644
index 0000000..d937b51
--- /dev/null
+++ b/Assets/Scripts/AcousticJammerOverlay.cs
@@ -0,0 +1,68 @@
+using UnityEngine;
+using UnityEngine.UI;
+
+///
+/// Полноэкранный визуальный эффект акустического ослепления (подавления чувств).
+/// Активируется во время крика Босса: полностью затемняет экран и гасит эхолокацию.
+///
+public class AcousticJammerOverlay : MonoBehaviour
+{
+ private Image overlayImage;
+ private CanvasGroup canvasGroup;
+
+ private float currentAlpha = 0f;
+
+ public static AcousticJammerOverlay Create(Transform hudCanvas)
+ {
+ var old = hudCanvas.Find("AcousticJammerOverlay");
+ if (old != null) DestroyImmediate(old.gameObject);
+
+ GameObject root = new GameObject("AcousticJammerOverlay", typeof(RectTransform), typeof(CanvasGroup));
+ root.transform.SetParent(hudCanvas, false);
+
+ RectTransform rt = root.GetComponent();
+ rt.anchorMin = Vector2.zero;
+ rt.anchorMax = Vector2.one;
+ rt.sizeDelta = Vector2.zero;
+
+ // Черный экран с легким темно-багровым оттенком
+ GameObject imgObj = new GameObject("VignetteBlackout", typeof(RectTransform), typeof(CanvasRenderer), typeof(Image));
+ imgObj.transform.SetParent(root.transform, false);
+ RectTransform imgRt = imgObj.GetComponent();
+ imgRt.anchorMin = Vector2.zero;
+ imgRt.anchorMax = Vector2.one;
+ imgRt.sizeDelta = Vector2.zero;
+
+ Image img = imgObj.GetComponent();
+ img.color = new Color(0.01f, 0.005f, 0.005f, 0.98f);
+ img.raycastTarget = false;
+
+ AcousticJammerOverlay overlay = root.AddComponent();
+ overlay.overlayImage = img;
+ overlay.canvasGroup = root.GetComponent();
+ overlay.canvasGroup.alpha = 0f;
+ overlay.canvasGroup.blocksRaycasts = false;
+ overlay.canvasGroup.interactable = false;
+
+ return overlay;
+ }
+
+ private void Awake()
+ {
+ if (canvasGroup == null) canvasGroup = GetComponent();
+ }
+
+ private void Update()
+ {
+ bool isBlinded = EchoTrigger.Instance != null && EchoTrigger.Instance.IsBlinded;
+ float targetAlpha = isBlinded ? 1f : 0f;
+ float speed = isBlinded ? 14f : 3.5f; // Мгновенно ослепляет, плавно возвращает зрение
+
+ currentAlpha = Mathf.MoveTowards(currentAlpha, targetAlpha, speed * Time.deltaTime);
+
+ if (canvasGroup != null)
+ {
+ canvasGroup.alpha = currentAlpha;
+ }
+ }
+}
diff --git a/Assets/Scripts/AcousticJammerOverlay.cs.meta b/Assets/Scripts/AcousticJammerOverlay.cs.meta
new file mode 100644
index 0000000..934a51a
--- /dev/null
+++ b/Assets/Scripts/AcousticJammerOverlay.cs.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: 2035ce02f06d82c438ae1be3ac0862f1
\ No newline at end of file
diff --git a/Assets/Scripts/BossArenaController.cs b/Assets/Scripts/BossArenaController.cs
new file mode 100644
index 0000000..b8287ea
--- /dev/null
+++ b/Assets/Scripts/BossArenaController.cs
@@ -0,0 +1,136 @@
+using System.Collections;
+using UnityEngine;
+
+///
+/// Контроллер арены босса на 2-м уровне.
+/// Блокирует двери отсека при входе игрока (карантинный локдаун) и не выпускает
+/// до тех пор, пока босс не будет побежден или пока игрок не погибнет.
+///
+public class BossArenaController : MonoBehaviour
+{
+ [Header("Ссылки на объекты арены")]
+ public TitanBossAI bossAI;
+ public GameObject blastDoorRoot;
+ public Collider blastDoorCollider;
+ public Light emergencyLight;
+
+ [Header("Состояние арены")]
+ public bool isLockdownActive = false;
+ public bool isBossDefeated = false;
+
+ private Vector3 doorOpenPos;
+ private Vector3 doorClosedPos;
+ private Coroutine doorMoveCoroutine;
+
+ private void Awake()
+ {
+ if (blastDoorRoot != null)
+ {
+ doorClosedPos = blastDoorRoot.transform.position;
+ doorOpenPos = doorClosedPos + Vector3.up * 4.2f;
+ // Изначально ворота открыты, чтобы игрок мог войти
+ blastDoorRoot.transform.position = doorOpenPos;
+ if (blastDoorCollider != null) blastDoorCollider.enabled = false;
+ }
+
+ if (emergencyLight != null)
+ {
+ emergencyLight.color = new Color(0.2f, 0.8f, 0.4f); // Зеленый дежурный свет до боя
+ emergencyLight.intensity = 1.5f;
+ }
+ }
+
+ private void OnTriggerEnter(Collider other)
+ {
+ if (isLockdownActive || isBossDefeated) return;
+
+ if (other.CompareTag("Player") || other.GetComponentInParent() != null)
+ {
+ InitiateLockdown();
+ }
+ }
+
+ public void InitiateLockdown()
+ {
+ if (isLockdownActive || isBossDefeated) return;
+ isLockdownActive = true;
+
+ Debug.Log("[Арена Босса] КАРАНТИННАЯ БЛОКИРОВКА: ВХОД ЗАПЕРТ!");
+
+ // Звук тревоги и герметизации
+ GameAudioSynthesizer.PlayLockdownAlarm();
+
+ // Закрываем гермоворота
+ if (blastDoorRoot != null)
+ {
+ if (doorMoveCoroutine != null) StopCoroutine(doorMoveCoroutine);
+ doorMoveCoroutine = StartCoroutine(RoutineMoveDoor(doorClosedPos, true));
+ }
+
+ // Включаем пульсирующий аварийный красный свет
+ if (emergencyLight != null)
+ {
+ emergencyLight.color = new Color(1.0f, 0.15f, 0.15f);
+ emergencyLight.intensity = 2.8f;
+ }
+
+ // Будим босса
+ if (bossAI != null)
+ {
+ bossAI.WakeUp();
+ }
+ }
+
+ public void OnBossDefeated()
+ {
+ if (isBossDefeated) return;
+ isBossDefeated = true;
+ isLockdownActive = false;
+
+ Debug.Log("[Арена Босса] БОСС УНИЧТОЖЕН: ВОРОТА РАЗБЛОКИРОВАНЫ!");
+
+ // Звук разблокировки гидравлики
+ GameAudioSynthesizer.PlayDoorHydraulic();
+
+ // Открываем ворота
+ if (blastDoorRoot != null)
+ {
+ if (doorMoveCoroutine != null) StopCoroutine(doorMoveCoroutine);
+ doorMoveCoroutine = StartCoroutine(RoutineMoveDoor(doorOpenPos, false));
+ }
+
+ // Возвращаем свет в спокойный зеленый/бирюзовый
+ if (emergencyLight != null)
+ {
+ emergencyLight.color = new Color(0.2f, 1.0f, 0.5f);
+ emergencyLight.intensity = 2.0f;
+ }
+ }
+
+ private IEnumerator RoutineMoveDoor(Vector3 targetPos, bool enableColliderAtEnd)
+ {
+ if (blastDoorCollider != null)
+ {
+ if (enableColliderAtEnd) blastDoorCollider.enabled = true;
+ else blastDoorCollider.enabled = false;
+ }
+
+ float duration = 1.0f;
+ float elapsed = 0f;
+ Vector3 start = blastDoorRoot.transform.position;
+
+ while (elapsed < duration)
+ {
+ elapsed += Time.deltaTime;
+ float t = Mathf.SmoothStep(0f, 1f, elapsed / duration);
+ blastDoorRoot.transform.position = Vector3.Lerp(start, targetPos, t);
+ yield return null;
+ }
+
+ blastDoorRoot.transform.position = targetPos;
+ if (enableColliderAtEnd && blastDoorCollider != null)
+ {
+ blastDoorCollider.enabled = true;
+ }
+ }
+}
diff --git a/Assets/Scripts/BossArenaController.cs.meta b/Assets/Scripts/BossArenaController.cs.meta
new file mode 100644
index 0000000..698f033
--- /dev/null
+++ b/Assets/Scripts/BossArenaController.cs.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: 1808e83064e2103478613dd1583f2b8e
\ No newline at end of file
diff --git a/Assets/Scripts/BossHealthBarUI.cs b/Assets/Scripts/BossHealthBarUI.cs
new file mode 100644
index 0000000..8b955c4
--- /dev/null
+++ b/Assets/Scripts/BossHealthBarUI.cs
@@ -0,0 +1,192 @@
+using UnityEngine;
+using UnityEngine.UI;
+
+///
+/// Шкала здоровья Босса вверху посередине экрана.
+/// Показывает имя босса, текущее/максимальное здоровье и плавное заполнение полосы.
+///
+public class BossHealthBarUI : MonoBehaviour
+{
+ private static BossHealthBarUI _instance;
+ public static BossHealthBarUI Instance
+ {
+ get
+ {
+ if (_instance == null)
+ _instance = FindAnyObjectByType(FindObjectsInactive.Include);
+ return _instance;
+ }
+ }
+
+ [Header("Элементы интерфейса")]
+ public GameObject rootPanel;
+ public Text bossTitleText;
+ public Text bossSubText;
+ public Image fillBar;
+ public Text healthValueText;
+ public CanvasGroup canvasGroup;
+
+ private float targetFill = 1f;
+ private float currentFill = 1f;
+ private bool isVisible = false;
+
+ public static BossHealthBarUI Create(Transform hudCanvas)
+ {
+ var old = hudCanvas.Find("BossHealthBarPanel");
+ if (old != null) DestroyImmediate(old.gameObject);
+
+ Font defaultFont = Resources.GetBuiltinResource("LegacyRuntime.ttf");
+
+ // 1. Корневой объект
+ GameObject root = new GameObject("BossHealthBarPanel", typeof(RectTransform), typeof(CanvasGroup));
+ root.transform.SetParent(hudCanvas, false);
+
+ RectTransform rootRt = root.GetComponent();
+ rootRt.anchorMin = new Vector2(0.5f, 1.0f);
+ rootRt.anchorMax = new Vector2(0.5f, 1.0f);
+ rootRt.pivot = new Vector2(0.5f, 1.0f);
+ rootRt.anchoredPosition = new Vector2(0f, -22f);
+ rootRt.sizeDelta = new Vector2(560f, 62f);
+
+ // 2. Фон контейнера
+ Image bgImg = root.AddComponent();
+ bgImg.color = new Color(0.04f, 0.04f, 0.05f, 0.92f);
+
+ Outline outline = root.AddComponent();
+ outline.effectColor = new Color(1.0f, 0.25f, 0.25f, 0.65f);
+ outline.effectDistance = new Vector2(1.5f, -1.5f);
+
+ // 3. Заголовок босса
+ GameObject titleObj = new GameObject("BossTitle", typeof(RectTransform), typeof(CanvasRenderer), typeof(Text));
+ titleObj.transform.SetParent(root.transform, false);
+ RectTransform titleRt = titleObj.GetComponent();
+ titleRt.anchorMin = new Vector2(0f, 0.62f);
+ titleRt.anchorMax = new Vector2(1f, 1.0f);
+ titleRt.offsetMin = new Vector2(15f, 0f);
+ titleRt.offsetMax = new Vector2(-15f, -4f);
+
+ Text titleText = titleObj.GetComponent();
+ titleText.font = defaultFont;
+ titleText.fontSize = 15;
+ titleText.fontStyle = FontStyle.Bold;
+ titleText.alignment = TextAnchor.MiddleCenter;
+ titleText.color = new Color(1.0f, 0.3f, 0.3f, 1.0f);
+ titleText.text = "ТИП-0: АЛЬФА-МУТАНТ (ПАТРИАРХ)";
+
+ // 4. Фон полосы здоровья
+ GameObject barBgObj = new GameObject("BarBackground", typeof(RectTransform), typeof(CanvasRenderer), typeof(Image));
+ barBgObj.transform.SetParent(root.transform, false);
+ RectTransform barBgRt = barBgObj.GetComponent();
+ barBgRt.anchorMin = new Vector2(0f, 0.16f);
+ barBgRt.anchorMax = new Vector2(1f, 0.54f);
+ barBgRt.offsetMin = new Vector2(14f, 0f);
+ barBgRt.offsetMax = new Vector2(-14f, 0f);
+
+ Image barBgImg = barBgObj.GetComponent();
+ barBgImg.color = new Color(0.18f, 0.05f, 0.05f, 0.95f);
+
+ // 5. Заполнение полосы (красный градиент)
+ GameObject fillObj = new GameObject("BarFill", typeof(RectTransform), typeof(CanvasRenderer), typeof(Image));
+ fillObj.transform.SetParent(barBgObj.transform, false);
+ RectTransform fillRt = fillObj.GetComponent();
+ fillRt.anchorMin = Vector2.zero;
+ fillRt.anchorMax = Vector2.one;
+ fillRt.sizeDelta = Vector2.zero;
+
+ Image fillImg = fillObj.GetComponent();
+ fillImg.type = Image.Type.Filled;
+ fillImg.fillMethod = Image.FillMethod.Horizontal;
+ fillImg.fillOrigin = (int)Image.OriginHorizontal.Left;
+ fillImg.color = new Color(0.95f, 0.2f, 0.2f, 1.0f);
+
+ // 6. Текст числового значения HP
+ GameObject hpTxtObj = new GameObject("HealthText", typeof(RectTransform), typeof(CanvasRenderer), typeof(Text));
+ hpTxtObj.transform.SetParent(barBgObj.transform, false);
+ RectTransform hpTxtRt = hpTxtObj.GetComponent();
+ hpTxtRt.anchorMin = Vector2.zero;
+ hpTxtRt.anchorMax = Vector2.one;
+ hpTxtRt.sizeDelta = Vector2.zero;
+
+ Text hpTxt = hpTxtObj.GetComponent();
+ hpTxt.font = defaultFont;
+ hpTxt.fontSize = 13;
+ hpTxt.fontStyle = FontStyle.Bold;
+ hpTxt.alignment = TextAnchor.MiddleCenter;
+ hpTxt.color = Color.white;
+ hpTxt.text = "500 / 500";
+
+ BossHealthBarUI barUI = root.AddComponent();
+ barUI.rootPanel = root;
+ barUI.bossTitleText = titleText;
+ barUI.fillBar = fillImg;
+ barUI.healthValueText = hpTxt;
+ barUI.canvasGroup = root.GetComponent();
+ barUI.canvasGroup.alpha = 0f;
+ barUI.canvasGroup.blocksRaycasts = false;
+ barUI.canvasGroup.interactable = false;
+
+ root.SetActive(false);
+ return barUI;
+ }
+
+ private void Awake()
+ {
+ _instance = this;
+ if (canvasGroup == null) canvasGroup = GetComponent();
+ }
+
+ private void Update()
+ {
+ // Плавное заполнение полосы
+ currentFill = Mathf.MoveTowards(currentFill, targetFill, 2.5f * Time.deltaTime);
+ if (fillBar != null)
+ {
+ fillBar.fillAmount = currentFill;
+ }
+
+ // Плавный альфа-фейд
+ if (canvasGroup != null)
+ {
+ float targetAlpha = isVisible ? 1f : 0f;
+ canvasGroup.alpha = Mathf.MoveTowards(canvasGroup.alpha, targetAlpha, 4f * Time.deltaTime);
+
+ if (!isVisible && canvasGroup.alpha <= 0.01f && gameObject.activeSelf)
+ {
+ gameObject.SetActive(false);
+ }
+ }
+ }
+
+ public void ShowBoss(string name, float current, float max)
+ {
+ if (bossTitleText != null) bossTitleText.text = name;
+ targetFill = Mathf.Clamp01(current / max);
+ currentFill = targetFill;
+ if (fillBar != null) fillBar.fillAmount = currentFill;
+ if (healthValueText != null) healthValueText.text = $"{Mathf.CeilToInt(current)} / {Mathf.CeilToInt(max)}";
+
+ gameObject.SetActive(true);
+ isVisible = true;
+ }
+
+ public void UpdateHealth(float current, float max)
+ {
+ targetFill = Mathf.Clamp01(current / max);
+ if (healthValueText != null) healthValueText.text = $"{Mathf.Max(0, Mathf.CeilToInt(current))} / {Mathf.CeilToInt(max)}";
+
+ if (current <= 0f)
+ {
+ HideBoss(false);
+ }
+ }
+
+ public void HideBoss(bool instant = false)
+ {
+ isVisible = false;
+ if (instant)
+ {
+ if (canvasGroup != null) canvasGroup.alpha = 0f;
+ gameObject.SetActive(false);
+ }
+ }
+}
diff --git a/Assets/Scripts/BossHealthBarUI.cs.meta b/Assets/Scripts/BossHealthBarUI.cs.meta
new file mode 100644
index 0000000..ebb8ffd
--- /dev/null
+++ b/Assets/Scripts/BossHealthBarUI.cs.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: 8e942543155cd404e9091784c06ad005
\ No newline at end of file
diff --git a/Assets/Scripts/CameraFollow.cs b/Assets/Scripts/CameraFollow.cs
index 668214c..a25faf3 100644
--- a/Assets/Scripts/CameraFollow.cs
+++ b/Assets/Scripts/CameraFollow.cs
@@ -39,6 +39,7 @@ public class CameraFollow : MonoBehaviour
void Start()
{
+ Time.timeScale = 1f;
Vector3 angles = transform.eulerAngles;
pitch = angles.x;
yaw = angles.y;
@@ -52,6 +53,17 @@ public class CameraFollow : MonoBehaviour
// Исключаем слой Ignore Raycast (слой 2) из проверки стен
collisionLayers &= ~(1 << 2);
+
+ if (target != null)
+ {
+ Quaternion rot = Quaternion.Euler(pitch, yaw, 0f);
+ Vector3 targetFocus = target.position + (Vector3.up * height);
+ Vector3 rightOffset = rot * Vector3.right * shoulderOffset;
+ Vector3 desiredOrigin = targetFocus + rightOffset;
+ Vector3 backDir = -(rot * Vector3.forward);
+ transform.position = desiredOrigin + (backDir * distance);
+ transform.rotation = rot;
+ }
}
void LateUpdate()
diff --git a/Assets/Scripts/EchoTrigger.cs b/Assets/Scripts/EchoTrigger.cs
index 6270c2d..fbfd7b2 100644
--- a/Assets/Scripts/EchoTrigger.cs
+++ b/Assets/Scripts/EchoTrigger.cs
@@ -50,6 +50,24 @@ public class EchoTrigger : MonoBehaviour
[Header("Реакция мутантов")]
public bool alertMutants = true;
+ [Header("Акустическое ослепление (Босс)")]
+ private float blindnessTimer = 0f;
+ public bool IsBlinded => blindnessTimer > 0f;
+
+ ///
+ /// Полностью глушит эхолокацию: шум шагов, выстрелы и броски не создают волн
+ ///
+ public void ApplyBlindness(float duration)
+ {
+ blindnessTimer = Mathf.Max(blindnessTimer, duration);
+ for (int i = 0; i < MAX_WAVES; i++)
+ {
+ waveActive[i] = false;
+ SetFloatOnAllEchoMaterials("_EchoRadius" + (i + 1), 0f);
+ SetFloatOnAllEchoMaterials("_EchoOpacity" + (i + 1), 0f);
+ }
+ }
+
// Пул из 3 одновременных волн
private const int MAX_WAVES = 3;
private float[] waveRadii = new float[MAX_WAVES];
@@ -219,6 +237,15 @@ public class EchoTrigger : MonoBehaviour
void Update()
{
+ if (blindnessTimer > 0f)
+ {
+ blindnessTimer -= Time.deltaTime;
+ for (int i = 0; i < MAX_WAVES; i++)
+ {
+ SetFloatOnAllEchoMaterials("_EchoOpacity" + (i + 1), 0f);
+ }
+ }
+
HandleStepDetection();
HandleManualEchoPulse();
UpdateWaveShaderProgress();
@@ -226,6 +253,8 @@ public class EchoTrigger : MonoBehaviour
void HandleManualEchoPulse()
{
+ if (IsBlinded) return;
+
// Возможность выпустить эхолокационный импульс (Space, Q или ПКМ)
var keyboard = Keyboard.current;
var mouse = Mouse.current;
@@ -443,6 +472,8 @@ public class EchoTrigger : MonoBehaviour
public void TriggerExternalWave(Vector3 position, float targetMax, float targetIntensity)
{
+ if (IsBlinded) return;
+
if (allEchoMaterials.Count == 0)
{
CollectAllEchoMaterials();
diff --git a/Assets/Scripts/Editor/Level2SceneBuilder.cs b/Assets/Scripts/Editor/Level2SceneBuilder.cs
new file mode 100644
index 0000000..0ea59d3
--- /dev/null
+++ b/Assets/Scripts/Editor/Level2SceneBuilder.cs
@@ -0,0 +1,755 @@
+using UnityEngine;
+using UnityEditor;
+using UnityEditor.SceneManagement;
+using UnityEngine.UI;
+using Unity.AI.Navigation;
+using UnityEngine.AI;
+
+public static class Level2SceneBuilder
+{
+ [MenuItem("Tools/Synthesia/Build Level 2 (SubLevel Complex)")]
+ public static void BuildLevel2Scene()
+ {
+ Debug.Log("[Level 2] Начало сборки 2-го уровня...");
+
+ // 1. Открываем SampleScene как шаблон
+ string samplePath = "Assets/Scenes/SampleScene.unity";
+ string level2Path = "Assets/Scenes/Level2.unity";
+
+ var scene = EditorSceneManager.OpenScene(samplePath, OpenSceneMode.Single);
+
+ // 2. Сохраняем сцену под новым именем Level2.unity
+ bool savedAs = EditorSceneManager.SaveScene(scene, level2Path);
+ if (!savedAs)
+ {
+ Debug.LogError("[Level 2] Не удалось сохранить сцену как Level2.unity!");
+ return;
+ }
+
+ scene = EditorSceneManager.OpenScene(level2Path, OpenSceneMode.Single);
+
+ // 3. Очищаем объекты 1-го уровня
+ string[] toRemove = new string[] {
+ "Laboratory_Complex",
+ "Cosmic_Retro_Laboratory",
+ "Elevator_Level2_Zone",
+ "StoryNotes_Container",
+ "Enemies",
+ "StoryManager",
+ "SubLevel2_Complex",
+ "Enemies_Level2"
+ };
+
+ foreach (var name in toRemove)
+ {
+ var go = GameObject.Find(name);
+ if (go != null) Undo.DestroyObjectImmediate(go);
+ }
+
+ // Удаляем старые тестовые коробки патронов
+ var allBoxes = Object.FindObjectsByType(FindObjectsInactive.Include, FindObjectsSortMode.None);
+ foreach (var b in allBoxes)
+ {
+ Undo.DestroyObjectImmediate(b.gameObject);
+ }
+
+ // 4. Загрузка материалов и префабов
+ Material echoMat = AssetDatabase.LoadAssetAtPath("Assets/EchoCloudMat.mat");
+ if (echoMat == null) echoMat = AssetDatabase.LoadAssetAtPath("Assets/EchoMat.mat");
+
+ GameObject mutantPrefab = AssetDatabase.LoadAssetAtPath("Assets/Prefabs/Mutant.prefab");
+ Font defaultFont = Resources.GetBuiltinResource("LegacyRuntime.ttf");
+
+ // 5. Создаем контейнер SubLevel2_Complex
+ GameObject level2Root = new GameObject("SubLevel2_Complex");
+ level2Root.transform.position = Vector3.zero;
+
+ // Позиционируем игрока в стартовом лифте прибытия (0, 0.1, -22)
+ GameObject playerGo = GameObject.FindWithTag("Player");
+ if (playerGo == null) playerGo = GameObject.Find("Player");
+ if (playerGo != null)
+ {
+ playerGo.transform.position = new Vector3(0f, 0.15f, -22f);
+ playerGo.transform.rotation = Quaternion.identity;
+ }
+
+ // --- ГЕОМЕТРИЯ 2-ГО УРОВНЯ ---
+ // А. Шахта лифта прибытия (Arrival Chamber): (0, 0, -22), размер 6x6
+ BuildRoom(level2Root.transform, "Room_ArrivalElevator", new Vector3(0f, 0f, -22f), new Vector3(6f, 0.2f, 6f), 3.8f, echoMat,
+ hasNorthDoor: true, hasSouthDoor: false, hasWestDoor: false, hasEastDoor: false);
+
+ // Рама лифта прибытия
+ BuildElevatorShaft(level2Root.transform, new Vector3(0f, 0f, -22.5f), echoMat);
+
+ // Б. Южный шлюзовой коридор: (0, 0, -12.5), размер 4x13
+ BuildCorridor(level2Root.transform, "Corridor_South", new Vector3(0f, 0f, -12.5f), new Vector3(4f, 0.2f, 13f), 3.8f, echoMat, isNS: true);
+
+ // В. Центральный узел (Central Hub): (0, 0, 0), размер 12x12
+ BuildRoom(level2Root.transform, "Room_CentralHub", new Vector3(0f, 0f, 0f), new Vector3(12f, 0.2f, 12f), 3.8f, echoMat,
+ hasNorthDoor: true, hasSouthDoor: true, hasWestDoor: true, hasEastDoor: true);
+
+ // Колонны в Центральном узле
+ BuildPillar(level2Root.transform, new Vector3(-3.5f, 1.9f, -3.5f), new Vector3(1.2f, 3.8f, 1.2f), echoMat);
+ BuildPillar(level2Root.transform, new Vector3(3.5f, 1.9f, -3.5f), new Vector3(1.2f, 3.8f, 1.2f), echoMat);
+ BuildPillar(level2Root.transform, new Vector3(-3.5f, 1.9f, 3.5f), new Vector3(1.2f, 3.8f, 1.2f), echoMat);
+ BuildPillar(level2Root.transform, new Vector3(3.5f, 1.9f, 3.5f), new Vector3(1.2f, 3.8f, 1.2f), echoMat);
+
+ // Г. Западный сектор: Крио-изолятор и виварий (-17, 0, 0), размер 14x14
+ BuildCorridor(level2Root.transform, "Corridor_West", new Vector3(-8f, 0f, 0f), new Vector3(4f, 0.2f, 4f), 3.8f, echoMat, isNS: false);
+ BuildRoom(level2Root.transform, "Room_CryoIsolation", new Vector3(-17f, 0f, 0f), new Vector3(14f, 0.2f, 14f), 3.8f, echoMat,
+ hasNorthDoor: false, hasSouthDoor: false, hasWestDoor: false, hasEastDoor: true);
+
+ // Д. Восточный сектор: Био-синтез и химические реакторы (17, 0, 0), размер 14x14
+ BuildCorridor(level2Root.transform, "Corridor_East", new Vector3(8f, 0f, 0f), new Vector3(4f, 0.2f, 4f), 3.8f, echoMat, isNS: false);
+ BuildRoom(level2Root.transform, "Room_BioSynthesis", new Vector3(17f, 0f, 0f), new Vector3(14f, 0.2f, 14f), 3.8f, echoMat,
+ hasNorthDoor: false, hasSouthDoor: false, hasWestDoor: true, hasEastDoor: false);
+
+ // Е. Северный переход к архиву и реактору (0, 0, 9), размер 4x6
+ BuildCorridor(level2Root.transform, "Corridor_North", new Vector3(0f, 0f, 9f), new Vector3(4f, 0.2f, 6f), 3.8f, echoMat, isNS: true);
+
+ // Ж. Сектор архивов и серверной (-11, 0, 15), размер 10x10
+ BuildCorridor(level2Root.transform, "Corridor_ArchivesBranch", new Vector3(-4.5f, 0f, 9f), new Vector3(5f, 0.2f, 4f), 3.8f, echoMat, isNS: false);
+ BuildRoom(level2Root.transform, "Room_SecurityArchives", new Vector3(-11f, 0f, 15f), new Vector3(10f, 0.2f, 10f), 3.8f, echoMat,
+ hasNorthDoor: false, hasSouthDoor: true, hasWestDoor: false, hasEastDoor: false);
+
+ // З. Главный реакторный отсек и эвакуационный шлюз (0, 0, 26), просторная арена 26x26 м
+ BuildRoom(level2Root.transform, "Room_ReactorAirlock", new Vector3(0f, 0f, 26f), new Vector3(26f, 0.2f, 26f), 4.5f, echoMat,
+ hasNorthDoor: false, hasSouthDoor: true, hasWestDoor: false, hasEastDoor: false);
+
+ // Массивные реакторные колонны-укрытия на арене босса
+ BuildPillar(level2Root.transform, new Vector3(-6.5f, 2.25f, 20f), new Vector3(1.6f, 4.5f, 1.6f), echoMat);
+ BuildPillar(level2Root.transform, new Vector3(6.5f, 2.25f, 20f), new Vector3(1.6f, 4.5f, 1.6f), echoMat);
+ BuildPillar(level2Root.transform, new Vector3(-6.5f, 2.25f, 31f), new Vector3(1.6f, 4.5f, 1.6f), echoMat);
+ BuildPillar(level2Root.transform, new Vector3(6.5f, 2.25f, 31f), new Vector3(1.6f, 4.5f, 1.6f), echoMat);
+
+ // Финальный терминал эвакуации и шлюз на севере арены (0, 0, 38.2)
+ BuildFinalEscapeAirlock(level2Root.transform, new Vector3(0f, 0f, 38.2f), echoMat);
+
+ // Атмосферное аварийное освещение (тусклые маяки)
+ BuildBeacon(level2Root.transform, new Vector3(0f, 2.5f, -22f), new Color(0.2f, 0.6f, 0.9f), 1.8f, 8f);
+ BuildBeacon(level2Root.transform, new Vector3(0f, 2.8f, 0f), new Color(1.0f, 0.75f, 0.2f), 2.2f, 12f);
+ BuildBeacon(level2Root.transform, new Vector3(-17f, 2.8f, 0f), new Color(0.1f, 0.8f, 0.9f), 1.8f, 10f);
+ BuildBeacon(level2Root.transform, new Vector3(17f, 2.8f, 0f), new Color(1.0f, 0.45f, 0.1f), 1.8f, 10f);
+ BuildBeacon(level2Root.transform, new Vector3(-11f, 2.5f, 15f), new Color(0.3f, 0.8f, 0.4f), 1.5f, 8f);
+ BuildBeacon(level2Root.transform, new Vector3(-8f, 3.2f, 22f), new Color(1.0f, 0.2f, 0.2f), 2.2f, 14f);
+ BuildBeacon(level2Root.transform, new Vector3(8f, 3.2f, 22f), new Color(1.0f, 0.2f, 0.2f), 2.2f, 14f);
+ BuildBeacon(level2Root.transform, new Vector3(-8f, 3.2f, 31f), new Color(1.0f, 0.2f, 0.2f), 2.2f, 14f);
+ BuildBeacon(level2Root.transform, new Vector3(8f, 3.2f, 31f), new Color(1.0f, 0.2f, 0.2f), 2.2f, 14f);
+
+ // Патроны на уровне 2
+ CreateAmmoBox(new Vector3(-18f, 0.3f, 4f), 14);
+ CreateAmmoBox(new Vector3(18f, 0.3f, -4f), 21);
+ CreateAmmoBox(new Vector3(-12f, 0.3f, 16f), 14);
+
+ // Физические предметы для бросков (отвлечение мутантов)
+ CreateThrowableProp(new Vector3(-2f, 0.5f, -2f), "Distraction_Flask_1");
+ CreateThrowableProp(new Vector3(2f, 0.5f, -1f), "Distraction_Flask_2");
+ CreateThrowableProp(new Vector3(-16f, 0.5f, 2f), "Distraction_Flask_3");
+ CreateThrowableProp(new Vector3(16f, 0.5f, 2f), "Distraction_Flask_4");
+
+ // 6. Противники и Босс Уровня 2
+ GameObject enemiesContainer = new GameObject("Enemies_Level2");
+ if (mutantPrefab != null)
+ {
+ SpawnMutant(mutantPrefab, enemiesContainer.transform, new Vector3(0f, 0.1f, 3f), "Mutant_Central_Hub");
+ SpawnMutant(mutantPrefab, enemiesContainer.transform, new Vector3(-17f, 0.1f, 0f), "Mutant_CryoVault");
+ SpawnMutant(mutantPrefab, enemiesContainer.transform, new Vector3(17f, 0.1f, 0f), "Mutant_BioCore");
+ SpawnMutant(mutantPrefab, enemiesContainer.transform, new Vector3(-11f, 0.1f, 15f), "Mutant_Archives");
+
+ // Уникальный Босс 2-го уровня в центре расширенной реакторной арены
+ GameObject bossObj = SpawnTitanBoss(mutantPrefab, enemiesContainer.transform, new Vector3(0f, 0.15f, 28f), "Titan_Boss_Alpha");
+ BuildBossArenaLockdown(level2Root.transform, new Vector3(0f, 0f, 13f), echoMat, bossObj);
+
+ // Боеприпасы и тактические колбы на арене босса
+ CreateAmmoBox(new Vector3(-9.5f, 0.3f, 18f), 21);
+ CreateAmmoBox(new Vector3(9.5f, 0.3f, 18f), 21);
+ CreateAmmoBox(new Vector3(-9.5f, 0.3f, 32f), 21);
+ CreateAmmoBox(new Vector3(9.5f, 0.3f, 32f), 14);
+ CreateThrowableProp(new Vector3(-6.5f, 0.5f, 25f), "Arena_Distraction_Flask_1");
+ CreateThrowableProp(new Vector3(6.5f, 0.5f, 25f), "Arena_Distraction_Flask_2");
+ CreateThrowableProp(new Vector3(0f, 0.5f, 34f), "Arena_Distraction_Flask_3");
+ }
+
+ // 7. Настройка UI (Финальная победа, полоса здоровья босса, оверлей ослепления)
+ SetupFinalVictoryUI();
+
+ // 8. Настраиваем и запекаем NavMesh для Уровня 2
+ BakeLevel2NavMesh();
+
+ // 9. Регистрация сцены в Build Settings
+ RegisterSceneInBuildSettings(level2Path);
+
+ // 10. Сохранение сцены
+ EditorSceneManager.MarkSceneDirty(scene);
+ EditorSceneManager.SaveScene(scene);
+
+ Debug.Log("[Level 2] Сборка 2-го уровня полностью завершена!");
+ }
+
+ private static void BuildRoom(Transform parent, string name, Vector3 center, Vector3 floorSize, float height, Material mat,
+ bool hasNorthDoor, bool hasSouthDoor, bool hasWestDoor, bool hasEastDoor)
+ {
+ GameObject room = new GameObject(name);
+ room.transform.SetParent(parent);
+ room.transform.position = center;
+
+ // Пол
+ GameObject floor = GameObject.CreatePrimitive(PrimitiveType.Cube);
+ floor.name = "Floor";
+ floor.transform.SetParent(room.transform);
+ floor.transform.localPosition = Vector3.zero;
+ floor.transform.localScale = floorSize;
+ if (mat != null) floor.GetComponent().sharedMaterial = mat;
+
+ // Потолок
+ GameObject roof = GameObject.CreatePrimitive(PrimitiveType.Cube);
+ roof.name = "Ceiling";
+ roof.transform.SetParent(room.transform);
+ roof.transform.localPosition = new Vector3(0f, height, 0f);
+ roof.transform.localScale = floorSize;
+ if (mat != null) roof.GetComponent().sharedMaterial = mat;
+
+ float halfX = floorSize.x * 0.5f;
+ float halfZ = floorSize.z * 0.5f;
+ float wallThick = 0.35f;
+
+ // Северная стена
+ BuildWallWithDoor(room.transform, new Vector3(0f, height * 0.5f, halfZ), floorSize.x, height, wallThick, hasNorthDoor, mat, false);
+ // Южная стена
+ BuildWallWithDoor(room.transform, new Vector3(0f, height * 0.5f, -halfZ), floorSize.x, height, wallThick, hasSouthDoor, mat, false);
+ // Западная стена
+ BuildWallWithDoor(room.transform, new Vector3(-halfX, height * 0.5f, 0f), floorSize.z, height, wallThick, hasWestDoor, mat, true);
+ // Восточная стена
+ BuildWallWithDoor(room.transform, new Vector3(halfX, height * 0.5f, 0f), floorSize.z, height, wallThick, hasEastDoor, mat, true);
+ }
+
+ private static void BuildWallWithDoor(Transform parent, Vector3 pos, float length, float height, float thick, bool hasDoor, Material mat, bool rotate90)
+ {
+ Quaternion rot = rotate90 ? Quaternion.Euler(0f, 90f, 0f) : Quaternion.identity;
+
+ if (!hasDoor)
+ {
+ GameObject wall = GameObject.CreatePrimitive(PrimitiveType.Cube);
+ wall.name = "SolidWall";
+ wall.transform.SetParent(parent);
+ wall.transform.localPosition = pos;
+ wall.transform.localRotation = rot;
+ wall.transform.localScale = new Vector3(length, height, thick);
+ if (mat != null) wall.GetComponent().sharedMaterial = mat;
+ }
+ else
+ {
+ float doorWidth = 3.6f;
+ float sideWidth = Mathf.Max((length - doorWidth) * 0.5f, 0.5f);
+
+ // Левый сегмент
+ GameObject leftPart = GameObject.CreatePrimitive(PrimitiveType.Cube);
+ leftPart.name = "Wall_PartL";
+ leftPart.transform.SetParent(parent);
+ Vector3 offsetL = rotate90 ? new Vector3(0f, 0f, -(doorWidth + sideWidth) * 0.5f) : new Vector3(-(doorWidth + sideWidth) * 0.5f, 0f, 0f);
+ leftPart.transform.localPosition = pos + offsetL;
+ leftPart.transform.localRotation = rot;
+ leftPart.transform.localScale = new Vector3(sideWidth, height, thick);
+ if (mat != null) leftPart.GetComponent().sharedMaterial = mat;
+
+ // Правый сегмент
+ GameObject rightPart = GameObject.CreatePrimitive(PrimitiveType.Cube);
+ rightPart.name = "Wall_PartR";
+ rightPart.transform.SetParent(parent);
+ Vector3 offsetR = rotate90 ? new Vector3(0f, 0f, (doorWidth + sideWidth) * 0.5f) : new Vector3((doorWidth + sideWidth) * 0.5f, 0f, 0f);
+ rightPart.transform.localPosition = pos + offsetR;
+ rightPart.transform.localRotation = rot;
+ rightPart.transform.localScale = new Vector3(sideWidth, height, thick);
+ if (mat != null) rightPart.GetComponent().sharedMaterial = mat;
+
+ // Верхняя перемычка
+ GameObject topLintel = GameObject.CreatePrimitive(PrimitiveType.Cube);
+ topLintel.name = "Wall_TopLintel";
+ topLintel.transform.SetParent(parent);
+ Vector3 offsetTop = new Vector3(0f, height * 0.38f, 0f);
+ topLintel.transform.localPosition = pos + offsetTop;
+ topLintel.transform.localRotation = rot;
+ topLintel.transform.localScale = new Vector3(doorWidth, height * 0.25f, thick);
+ if (mat != null) topLintel.GetComponent().sharedMaterial = mat;
+ }
+ }
+
+ private static void BuildCorridor(Transform parent, string name, Vector3 pos, Vector3 floorSize, float height, Material mat, bool isNS)
+ {
+ GameObject corr = new GameObject(name);
+ corr.transform.SetParent(parent);
+ corr.transform.position = pos;
+
+ GameObject floor = GameObject.CreatePrimitive(PrimitiveType.Cube);
+ floor.name = "Floor";
+ floor.transform.SetParent(corr.transform);
+ floor.transform.localPosition = Vector3.zero;
+ floor.transform.localScale = floorSize;
+ if (mat != null) floor.GetComponent().sharedMaterial = mat;
+
+ GameObject roof = GameObject.CreatePrimitive(PrimitiveType.Cube);
+ roof.name = "Ceiling";
+ roof.transform.SetParent(corr.transform);
+ roof.transform.localPosition = new Vector3(0f, height, 0f);
+ roof.transform.localScale = floorSize;
+ if (mat != null) roof.GetComponent().sharedMaterial = mat;
+
+ float thick = 0.35f;
+ if (isNS)
+ {
+ // Стены слева и справа
+ float halfW = floorSize.x * 0.5f;
+ GameObject wL = GameObject.CreatePrimitive(PrimitiveType.Cube);
+ wL.name = "Wall_L";
+ wL.transform.SetParent(corr.transform);
+ wL.transform.localPosition = new Vector3(-halfW, height * 0.5f, 0f);
+ wL.transform.localScale = new Vector3(thick, height, floorSize.z);
+ if (mat != null) wL.GetComponent().sharedMaterial = mat;
+
+ GameObject wR = GameObject.CreatePrimitive(PrimitiveType.Cube);
+ wR.name = "Wall_R";
+ wR.transform.SetParent(corr.transform);
+ wR.transform.localPosition = new Vector3(halfW, height * 0.5f, 0f);
+ wR.transform.localScale = new Vector3(thick, height, floorSize.z);
+ if (mat != null) wR.GetComponent().sharedMaterial = mat;
+ }
+ else
+ {
+ // Стены спереди и сзади
+ float halfL = floorSize.z * 0.5f;
+ GameObject wN = GameObject.CreatePrimitive(PrimitiveType.Cube);
+ wN.name = "Wall_N";
+ wN.transform.SetParent(corr.transform);
+ wN.transform.localPosition = new Vector3(0f, height * 0.5f, halfL);
+ wN.transform.localScale = new Vector3(floorSize.x, height, thick);
+ if (mat != null) wN.GetComponent().sharedMaterial = mat;
+
+ GameObject wS = GameObject.CreatePrimitive(PrimitiveType.Cube);
+ wS.name = "Wall_S";
+ wS.transform.SetParent(corr.transform);
+ wS.transform.localPosition = new Vector3(0f, height * 0.5f, -halfL);
+ wS.transform.localScale = new Vector3(floorSize.x, height, thick);
+ if (mat != null) wS.GetComponent().sharedMaterial = mat;
+ }
+ }
+
+ private static void BuildPillar(Transform parent, Vector3 pos, Vector3 size, Material mat)
+ {
+ GameObject p = GameObject.CreatePrimitive(PrimitiveType.Cube);
+ p.name = "Structural_Pillar";
+ p.transform.SetParent(parent);
+ p.transform.localPosition = pos;
+ p.transform.localScale = size;
+ if (mat != null) p.GetComponent().sharedMaterial = mat;
+ }
+
+ private static void BuildElevatorShaft(Transform parent, Vector3 pos, Material mat)
+ {
+ GameObject shaft = new GameObject("Arrival_Elevator_Shaft");
+ shaft.transform.SetParent(parent);
+ shaft.transform.position = pos;
+
+ Vector3[] corners = new Vector3[] {
+ new Vector3(-2.2f, 1.9f, -2.2f),
+ new Vector3(2.2f, 1.9f, -2.2f),
+ new Vector3(-2.2f, 1.9f, 2.2f),
+ new Vector3(2.2f, 1.9f, 2.2f)
+ };
+
+ for (int i = 0; i < corners.Length; i++)
+ {
+ GameObject col = GameObject.CreatePrimitive(PrimitiveType.Cube);
+ col.name = $"Shaft_Pillar_{i}";
+ col.transform.SetParent(shaft.transform);
+ col.transform.localPosition = corners[i];
+ col.transform.localScale = new Vector3(0.25f, 3.8f, 0.25f);
+ if (mat != null) col.GetComponent().sharedMaterial = mat;
+ }
+ }
+
+ private static void BuildFinalEscapeAirlock(Transform parent, Vector3 pos, Material mat)
+ {
+ GameObject airlock = new GameObject("Final_Escape_Airlock_Zone");
+ airlock.transform.SetParent(parent);
+ airlock.transform.position = pos;
+
+ // Массивная стальная рама шлюза
+ GameObject hatch = GameObject.CreatePrimitive(PrimitiveType.Cube);
+ hatch.name = "Airlock_BlastDoor";
+ hatch.transform.SetParent(airlock.transform);
+ hatch.transform.localPosition = new Vector3(0f, 2.1f, 0f);
+ hatch.transform.localScale = new Vector3(5f, 4.2f, 0.8f);
+ if (mat != null) hatch.GetComponent().sharedMaterial = mat;
+
+ // Консоль управления шлюзом (терминал)
+ GameObject console = GameObject.CreatePrimitive(PrimitiveType.Cube);
+ console.name = "FinalExit_Terminal_Console";
+ console.transform.SetParent(airlock.transform);
+ console.transform.localPosition = new Vector3(0f, 0.6f, -2.5f);
+ console.transform.localScale = new Vector3(0.9f, 1.2f, 0.5f);
+ if (mat != null) console.GetComponent().sharedMaterial = mat;
+
+ // Экран терминала
+ GameObject screen = GameObject.CreatePrimitive(PrimitiveType.Cube);
+ screen.name = "Terminal_Screen";
+ screen.transform.SetParent(console.transform);
+ screen.transform.localPosition = new Vector3(0f, 0.35f, 0.05f);
+ screen.transform.localRotation = Quaternion.Euler(25f, 0f, 0f);
+ screen.transform.localScale = new Vector3(0.7f, 0.4f, 0.15f);
+ if (mat != null) screen.GetComponent().sharedMaterial = mat;
+
+ // Световой маяк
+ GameObject lightObj = new GameObject("Airlock_StatusLight");
+ lightObj.transform.SetParent(console.transform);
+ lightObj.transform.localPosition = new Vector3(0f, 0.75f, 0f);
+ Light sl = lightObj.AddComponent();
+ sl.type = LightType.Point;
+ sl.color = new Color(1f, 0.35f, 0.1f);
+ sl.intensity = 2.5f;
+ sl.range = 6f;
+
+ // Скрипт финала
+ var terminalComp = console.AddComponent();
+ terminalComp.statusLight = sl;
+ terminalComp.screenRenderer = screen.GetComponent();
+ terminalComp.interactionDistance = 3.5f;
+ }
+
+ private static void BuildBeacon(Transform parent, Vector3 pos, Color color, float intensity, float range)
+ {
+ GameObject beacon = new GameObject("Emergency_Beacon");
+ beacon.transform.SetParent(parent);
+ beacon.transform.position = pos;
+
+ Light l = beacon.AddComponent();
+ l.type = LightType.Point;
+ l.color = color;
+ l.intensity = intensity;
+ l.range = range;
+ }
+
+ private static void CreateAmmoBox(Vector3 pos, int count)
+ {
+ GameObject box = GameObject.CreatePrimitive(PrimitiveType.Cube);
+ box.name = $"AmmoBox_({count})";
+ box.transform.position = pos;
+ box.transform.localScale = new Vector3(0.6f, 0.35f, 0.45f);
+
+ var pickup = box.AddComponent();
+ pickup.ammoAmount = count;
+ pickup.pickupOnTouch = true;
+ }
+
+ private static void CreateThrowableProp(Vector3 pos, string name)
+ {
+ GameObject prop = GameObject.CreatePrimitive(PrimitiveType.Cylinder);
+ prop.name = name;
+ prop.transform.position = pos;
+ prop.transform.localScale = new Vector3(0.3f, 0.35f, 0.3f);
+
+ var rb = prop.AddComponent();
+ rb.mass = 2.5f;
+
+ prop.layer = LayerMask.NameToLayer("Default");
+ }
+
+ private static void SpawnMutant(GameObject prefab, Transform parent, Vector3 pos, string name)
+ {
+ GameObject mutant = PrefabUtility.InstantiatePrefab(prefab) as GameObject;
+ if (mutant == null) mutant = Object.Instantiate(prefab);
+ mutant.name = name;
+ mutant.transform.SetParent(parent);
+ mutant.transform.position = pos;
+ }
+
+ private static GameObject SpawnTitanBoss(GameObject prefab, Transform parent, Vector3 pos, string name)
+ {
+ GameObject boss = PrefabUtility.InstantiatePrefab(prefab) as GameObject;
+ if (boss == null) boss = Object.Instantiate(prefab);
+ boss.name = name;
+ boss.transform.SetParent(parent);
+ boss.transform.position = pos;
+ boss.transform.localScale = new Vector3(1.75f, 1.75f, 1.75f); // Массивный титан
+
+ // Удаляем обычный BlindMutantAI, чтобы боссом управлял специализированный TitanBossAI
+ var standardAI = boss.GetComponent();
+ if (standardAI != null) Object.DestroyImmediate(standardAI);
+
+ // Настраиваем здоровье босса на 200 HP
+ var health = boss.GetComponent();
+ if (health == null) health = boss.AddComponent();
+ health.maxHealth = 200f;
+
+ // Добавляем специализированный интеллект босса
+ var titanAI = boss.GetComponent();
+ if (titanAI == null) titanAI = boss.AddComponent();
+ titanAI.walkSpeed = 2.8f;
+ titanAI.runSpeed = 4.6f;
+ titanAI.meleeDamage = 18f;
+ titanAI.meleeCooldown = 2.2f;
+ titanAI.spitDamage = 14f;
+ titanAI.spitCooldown = 8.5f;
+
+ // Настраиваем NavMeshAgent под габариты босса
+ var agent = boss.GetComponent();
+ if (agent != null)
+ {
+ agent.speed = 2.8f;
+ agent.radius = 0.85f;
+ agent.height = 3.0f;
+ agent.stoppingDistance = 2.4f;
+ agent.acceleration = 10f;
+ }
+
+ // Подсветка биолюминесценции босса (багровое свечение)
+ GameObject bossGlow = new GameObject("Titan_Bioluminescence");
+ bossGlow.transform.SetParent(boss.transform);
+ bossGlow.transform.localPosition = new Vector3(0f, 1.8f, 0f);
+ Light glowLight = bossGlow.AddComponent();
+ glowLight.type = LightType.Point;
+ glowLight.color = new Color(0.95f, 0.15f, 0.2f);
+ glowLight.range = 7.5f;
+ glowLight.intensity = 2.4f;
+
+ return boss;
+ }
+
+ private static void BuildBossArenaLockdown(Transform parent, Vector3 entrancePos, Material echoMat, GameObject bossObj)
+ {
+ GameObject arenaRoot = new GameObject("BossArena_LockdownManager");
+ arenaRoot.transform.SetParent(parent);
+ arenaRoot.transform.position = entrancePos;
+
+ // 1. Гермоворота (Blast Door) на входе в реакторную комнату (pos = 0, 0, 13)
+ // Вход шириной 3.6м, высотой 4.2м
+ GameObject doorObj = GameObject.CreatePrimitive(PrimitiveType.Cube);
+ doorObj.name = "BlastDoor_Quarantine";
+ doorObj.transform.SetParent(arenaRoot.transform);
+ doorObj.transform.position = entrancePos + new Vector3(0f, 2.1f, 0f);
+ doorObj.transform.localScale = new Vector3(3.8f, 4.2f, 0.45f);
+ if (echoMat != null) doorObj.GetComponent().sharedMaterial = echoMat;
+
+ // Добавляем NavMeshObstacle для предотвращения прохода через закрытую дверь
+ var obstacle = doorObj.AddComponent();
+ obstacle.carving = true;
+ obstacle.size = new Vector3(3.8f, 4.2f, 0.45f);
+
+ // 2. Сигнальная лампа карантина над дверью
+ GameObject lampObj = new GameObject("Quarantine_EmergencyLight");
+ lampObj.transform.SetParent(arenaRoot.transform);
+ lampObj.transform.position = entrancePos + new Vector3(0f, 3.8f, 0.8f);
+
+ Light alertLight = lampObj.AddComponent();
+ alertLight.type = LightType.Point;
+ alertLight.color = new Color(0.2f, 0.85f, 0.35f); // До боя дежурный зеленоватый свет
+ alertLight.range = 10f;
+ alertLight.intensity = 1.8f;
+
+ // 3. Зона триггера блокировки (сразу за дверью внутри комнаты)
+ GameObject triggerObj = new GameObject("Trigger_LockdownArea");
+ triggerObj.transform.SetParent(arenaRoot.transform);
+ triggerObj.transform.position = entrancePos + new Vector3(0f, 1.5f, 2.8f);
+
+ BoxCollider col = triggerObj.AddComponent();
+ col.isTrigger = true;
+ col.size = new Vector3(5.5f, 3.5f, 3.5f);
+
+ var rb = triggerObj.AddComponent();
+ rb.isKinematic = true;
+
+ // Навешиваем BossArenaController прямо на триггер
+ var arenaCtrl = triggerObj.AddComponent();
+ arenaCtrl.blastDoorRoot = doorObj;
+ arenaCtrl.blastDoorCollider = doorObj.GetComponent();
+ arenaCtrl.emergencyLight = alertLight;
+
+ if (bossObj != null)
+ {
+ var titanAI = bossObj.GetComponent();
+ arenaCtrl.bossAI = titanAI;
+ if (titanAI != null)
+ {
+ titanAI.arenaController = arenaCtrl;
+ }
+ }
+ }
+
+ private static void SetupFinalVictoryUI()
+ {
+ GameObject hudCanvas = GameObject.Find("HUD_Canvas");
+ if (hudCanvas == null) return;
+
+ // Создаем полосу здоровья босса (скрыта по умолчанию)
+ BossHealthBarUI.Create(hudCanvas.transform);
+
+ // Создаем оверлей акустического ослепления босса (скрыт по умолчанию)
+ AcousticJammerOverlay.Create(hudCanvas.transform);
+
+ // Проверяем, существует ли уже панель победы
+ var old = hudCanvas.transform.Find("FinalVictoryPanel");
+ if (old != null) Undo.DestroyObjectImmediate(old.gameObject);
+
+ // Корневая панель
+ GameObject root = new GameObject("FinalVictoryPanel", typeof(RectTransform), typeof(CanvasRenderer), typeof(Image));
+ root.transform.SetParent(hudCanvas.transform, false);
+ RectTransform rt = root.GetComponent();
+ rt.anchorMin = Vector2.zero;
+ rt.anchorMax = Vector2.one;
+ rt.sizeDelta = Vector2.zero;
+
+ Image bg = root.GetComponent();
+ bg.color = new Color(0.02f, 0.02f, 0.03f, 0.95f);
+
+ // Карточка
+ GameObject card = new GameObject("VictoryCard", typeof(RectTransform), typeof(CanvasRenderer), typeof(Image), typeof(Outline));
+ card.transform.SetParent(root.transform, false);
+ RectTransform cardRt = card.GetComponent();
+ cardRt.anchorMin = new Vector2(0.5f, 0.5f);
+ cardRt.anchorMax = new Vector2(0.5f, 0.5f);
+ cardRt.pivot = new Vector2(0.5f, 0.5f);
+ cardRt.sizeDelta = new Vector2(680f, 440f);
+
+ Image cardImg = card.GetComponent();
+ cardImg.color = new Color(0.06f, 0.06f, 0.07f, 1f);
+
+ Outline cardOutline = card.GetComponent();
+ cardOutline.effectColor = new Color(0.2f, 0.9f, 0.5f, 0.8f);
+ cardOutline.effectDistance = new Vector2(2f, -2f);
+
+ // Заголовок
+ GameObject titleObj = new GameObject("Title", typeof(RectTransform), typeof(CanvasRenderer), typeof(Text));
+ titleObj.transform.SetParent(card.transform, false);
+ RectTransform titleRt = titleObj.GetComponent();
+ titleRt.anchorMin = new Vector2(0f, 1f);
+ titleRt.anchorMax = new Vector2(1f, 1f);
+ titleRt.pivot = new Vector2(0.5f, 1f);
+ titleRt.anchoredPosition = new Vector2(0f, -25f);
+ titleRt.sizeDelta = new Vector2(620f, 45f);
+
+ Text titleTxt = titleObj.GetComponent();
+ titleTxt.text = "МИССИЯ ВЫПОЛНЕНА // ЭВАКУАЦИЯ УСПЕШНА!";
+ titleTxt.font = Resources.GetBuiltinResource("LegacyRuntime.ttf");
+ titleTxt.fontSize = 22;
+ titleTxt.fontStyle = FontStyle.Bold;
+ titleTxt.alignment = TextAnchor.MiddleCenter;
+ titleTxt.color = new Color(0.2f, 1.0f, 0.5f, 1.0f);
+
+ // Описание
+ GameObject descObj = new GameObject("Description", typeof(RectTransform), typeof(CanvasRenderer), typeof(Text));
+ descObj.transform.SetParent(card.transform, false);
+ RectTransform descRt = descObj.GetComponent();
+ descRt.anchorMin = new Vector2(0.5f, 0.5f);
+ descRt.anchorMax = new Vector2(0.5f, 0.5f);
+ descRt.pivot = new Vector2(0.5f, 0.5f);
+ descRt.anchoredPosition = new Vector2(0f, 15f);
+ descRt.sizeDelta = new Vector2(580f, 140f);
+
+ Text descTxt = descObj.GetComponent();
+ descTxt.text = "Вы успешно преодолели Сектор глубоких исследований, обошли слепых мутантов и активировали аварийный гермошлюз.\n\nКомплекс 'Synthesia' запечатан. Вы выбрались на поверхность живым!";
+ descTxt.font = Resources.GetBuiltinResource("LegacyRuntime.ttf");
+ descTxt.fontSize = 16;
+ descTxt.lineSpacing = 1.3f;
+ descTxt.alignment = TextAnchor.MiddleCenter;
+ descTxt.color = new Color(0.9f, 0.9f, 0.9f, 0.95f);
+
+ // Кнопка В главное меню
+ GameObject btnMenuObj = new GameObject("MainMenuButton", typeof(RectTransform), typeof(CanvasRenderer), typeof(Image), typeof(Button));
+ btnMenuObj.transform.SetParent(card.transform, false);
+ RectTransform btnMenuRt = btnMenuObj.GetComponent();
+ btnMenuRt.anchorMin = new Vector2(0.5f, 0f);
+ btnMenuRt.anchorMax = new Vector2(0.5f, 0f);
+ btnMenuRt.pivot = new Vector2(0.5f, 0f);
+ btnMenuRt.anchoredPosition = new Vector2(-150f, 30f);
+ btnMenuRt.sizeDelta = new Vector2(260f, 48f);
+
+ Image btnMenuImg = btnMenuObj.GetComponent();
+ btnMenuImg.color = new Color(0.18f, 0.18f, 0.20f, 1f);
+ Button btnMenu = btnMenuObj.GetComponent