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 0c08038..7662c83 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 @@ -115,12 +115,12 @@ Material: - _DetailNormalMapScale: 1 - _DstBlend: 0 - _DstBlendAlpha: 0 - - _EchoOpacity1: 0 - - _EchoOpacity2: 0 - - _EchoOpacity3: 0 - - _EchoRadius1: 0 - - _EchoRadius2: 0 - - _EchoRadius3: 0 + - _EchoOpacity1: 0.1 + - _EchoOpacity2: 0.1 + - _EchoOpacity3: 0.1 + - _EchoRadius1: 0.05 + - _EchoRadius2: 0.05 + - _EchoRadius3: 0.05 - _EnvironmentReflections: 1 - _FresnelPower: 2.5 - _FresnelStrength: 0.4 @@ -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: 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} + - _EchoPosition1: {r: -12.45096, g: 0.36079788, b: -6.7416964, a: 1} + - _EchoPosition2: {r: -14.170757, g: 0.5187793, b: -6.8188305, a: 1} + - _EchoPosition3: {r: -12.694297, g: 0.5, b: -6.175, 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 63f1a00..337c6cf 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 @@ -99,12 +99,12 @@ Material: - _DetailNormalMapScale: 1 - _DstBlend: 0 - _DstBlendAlpha: 0 - - _EchoOpacity1: 0 - - _EchoOpacity2: 0 - - _EchoOpacity3: 0 - - _EchoRadius1: 0 - - _EchoRadius2: 0 - - _EchoRadius3: 0 + - _EchoOpacity1: 0.1 + - _EchoOpacity2: 0.1 + - _EchoOpacity3: 0.1 + - _EchoRadius1: 0.05 + - _EchoRadius2: 0.05 + - _EchoRadius3: 0.05 - _EnvironmentReflections: 1 - _FresnelPower: 2.5 - _FresnelStrength: 0.4 @@ -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: 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} + - _EchoPosition1: {r: -12.45096, g: 0.36079788, b: -6.7416964, a: 1} + - _EchoPosition2: {r: -14.170757, g: 0.5187793, b: -6.8188305, a: 1} + - _EchoPosition3: {r: -12.694297, g: 0.5, b: -6.175, 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 50af68d..f887fcb 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 @@ -100,12 +100,12 @@ Material: - _DetailNormalMapScale: 1 - _DstBlend: 0 - _DstBlendAlpha: 0 - - _EchoOpacity1: 0 - - _EchoOpacity2: 0 - - _EchoOpacity3: 0 - - _EchoRadius1: 0 - - _EchoRadius2: 0 - - _EchoRadius3: 0 + - _EchoOpacity1: 0.1 + - _EchoOpacity2: 0.1 + - _EchoOpacity3: 0.1 + - _EchoRadius1: 0.05 + - _EchoRadius2: 0.05 + - _EchoRadius3: 0.05 - _EnvironmentReflections: 1 - _FresnelPower: 2.5 - _FresnelStrength: 0.4 @@ -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: 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} + - _EchoPosition1: {r: -12.45096, g: 0.36079788, b: -6.7416964, a: 1} + - _EchoPosition2: {r: -14.170757, g: 0.5187793, b: -6.8188305, a: 1} + - _EchoPosition3: {r: -12.694297, g: 0.5, b: -6.175, 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 2b89fe3..0466b81 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 @@ -115,12 +115,12 @@ Material: - _DetailNormalMapScale: 1 - _DstBlend: 0 - _DstBlendAlpha: 0 - - _EchoOpacity1: 0 - - _EchoOpacity2: 0 - - _EchoOpacity3: 0 - - _EchoRadius1: 0 - - _EchoRadius2: 0 - - _EchoRadius3: 0 + - _EchoOpacity1: 0.1 + - _EchoOpacity2: 0.1 + - _EchoOpacity3: 0.1 + - _EchoRadius1: 0.05 + - _EchoRadius2: 0.05 + - _EchoRadius3: 0.05 - _EnvironmentReflections: 1 - _FresnelPower: 2.5 - _FresnelStrength: 0.4 @@ -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: 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} + - _EchoPosition1: {r: -12.45096, g: 0.36079788, b: -6.7416964, a: 1} + - _EchoPosition2: {r: -14.170757, g: 0.5187793, b: -6.8188305, a: 1} + - _EchoPosition3: {r: -12.694297, g: 0.5, b: -6.175, 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 cc58146..da3b74b 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 @@ -102,12 +102,12 @@ Material: - _DetailNormalMapScale: 1 - _DstBlend: 0 - _DstBlendAlpha: 0 - - _EchoOpacity1: 0 - - _EchoOpacity2: 0 - - _EchoOpacity3: 0 - - _EchoRadius1: 0 - - _EchoRadius2: 0 - - _EchoRadius3: 0 + - _EchoOpacity1: 0.1 + - _EchoOpacity2: 0.1 + - _EchoOpacity3: 0.1 + - _EchoRadius1: 0.05 + - _EchoRadius2: 0.05 + - _EchoRadius3: 0.05 - _EnvironmentReflections: 1 - _FresnelPower: 2.5 - _FresnelStrength: 0.4 @@ -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: 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} + - _EchoPosition1: {r: -12.45096, g: 0.36079788, b: -6.7416964, a: 1} + - _EchoPosition2: {r: -14.170757, g: 0.5187793, b: -6.8188305, a: 1} + - _EchoPosition3: {r: -12.694297, g: 0.5, b: -6.175, 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 9504294..4d56ecb 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 @@ -101,12 +101,12 @@ Material: - _DetailNormalMapScale: 1 - _DstBlend: 0 - _DstBlendAlpha: 0 - - _EchoOpacity1: 0 - - _EchoOpacity2: 0 - - _EchoOpacity3: 0 - - _EchoRadius1: 0 - - _EchoRadius2: 0 - - _EchoRadius3: 0 + - _EchoOpacity1: 0.1 + - _EchoOpacity2: 0.1 + - _EchoOpacity3: 0.1 + - _EchoRadius1: 0.05 + - _EchoRadius2: 0.05 + - _EchoRadius3: 0.05 - _EnvironmentReflections: 1 - _FresnelPower: 2.5 - _FresnelStrength: 0.4 @@ -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: 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} + - _EchoPosition1: {r: -12.45096, g: 0.36079788, b: -6.7416964, a: 1} + - _EchoPosition2: {r: -14.170757, g: 0.5187793, b: -6.8188305, a: 1} + - _EchoPosition3: {r: -12.694297, g: 0.5, b: -6.175, 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 f77d1a2..7d08cb1 100644 --- a/Assets/3D Laboratory Environment with Appratus/Materials/lambert1.mat +++ b/Assets/3D Laboratory Environment with Appratus/Materials/lambert1.mat @@ -72,12 +72,12 @@ Material: - _Cutoff: 0.5 - _DetailNormalMapScale: 1 - _DstBlend: 0 - - _EchoOpacity1: 0 - - _EchoOpacity2: 0 - - _EchoOpacity3: 0 - - _EchoRadius1: 0 - - _EchoRadius2: 0 - - _EchoRadius3: 0 + - _EchoOpacity1: 0.1 + - _EchoOpacity2: 0.1 + - _EchoOpacity3: 0.1 + - _EchoRadius1: 0.05 + - _EchoRadius2: 0.05 + - _EchoRadius3: 0.05 - _FresnelPower: 2.5 - _FresnelStrength: 0.4 - _GlossMapScale: 1 @@ -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: 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} + - _EchoPosition1: {r: -12.45096, g: 0.36079788, b: -6.7416964, a: 1} + - _EchoPosition2: {r: -14.170757, g: 0.5187793, b: -6.8188305, a: 1} + - _EchoPosition3: {r: -12.694297, g: 0.5, b: -6.175, 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 9052465..e939768 100644 --- a/Assets/EchoCloudMat.mat +++ b/Assets/EchoCloudMat.mat @@ -62,12 +62,12 @@ Material: - _CloudBandWidth: 3.2 - _ColorRevealIntensity: 1.6 - _ColorRevealSharpness: 1 - - _EchoOpacity1: 0 - - _EchoOpacity2: 0 - - _EchoOpacity3: 0 - - _EchoRadius1: 0 - - _EchoRadius2: 0 - - _EchoRadius3: 0 + - _EchoOpacity1: 0.1 + - _EchoOpacity2: 0.1 + - _EchoOpacity3: 0.1 + - _EchoRadius1: 0.05 + - _EchoRadius2: 0.05 + - _EchoRadius3: 0.05 - _FresnelPower: 2.5 - _FresnelStrength: 0.4 - _LeadingEdgeSoftness: 1.2 @@ -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: 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} + - _EchoPosition1: {r: -12.45096, g: 0.36079788, b: -6.7416964, a: 1} + - _EchoPosition2: {r: -14.170757, g: 0.5187793, b: -6.8188305, a: 1} + - _EchoPosition3: {r: -12.694297, g: 0.5, b: -6.175, 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 index ef47a43..6e8bb24 100644 Binary files a/Assets/Scenes/Level2.unity and b/Assets/Scenes/Level2.unity differ diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index 556d80c..3411096 100644 Binary files a/Assets/Scenes/SampleScene.unity and b/Assets/Scenes/SampleScene.unity differ diff --git a/Assets/Scripts/BossArenaController.cs b/Assets/Scripts/BossArenaController.cs index b8287ea..2ab57b6 100644 --- a/Assets/Scripts/BossArenaController.cs +++ b/Assets/Scripts/BossArenaController.cs @@ -18,6 +18,21 @@ public class BossArenaController : MonoBehaviour public bool isLockdownActive = false; public bool isBossDefeated = false; + public bool AreDoorsLocked => isLockdownActive; + + public void LockArenaDoors() + { + isLockdownActive = true; + } + + public void BindBossForTest(MutantHealth health) + { + if (health != null) + { + health.OnDied += OnBossDefeated; + } + } + private Vector3 doorOpenPos; private Vector3 doorClosedPos; private Coroutine doorMoveCoroutine; @@ -90,14 +105,19 @@ public class BossArenaController : MonoBehaviour Debug.Log("[Арена Босса] БОСС УНИЧТОЖЕН: ВОРОТА РАЗБЛОКИРОВАНЫ!"); // Звук разблокировки гидравлики - GameAudioSynthesizer.PlayDoorHydraulic(); + if (Application.isPlaying) + GameAudioSynthesizer.PlayDoorHydraulic(); // Открываем ворота - if (blastDoorRoot != null) + if (blastDoorRoot != null && Application.isPlaying) { if (doorMoveCoroutine != null) StopCoroutine(doorMoveCoroutine); doorMoveCoroutine = StartCoroutine(RoutineMoveDoor(doorOpenPos, false)); } + else if (blastDoorRoot != null) + { + blastDoorRoot.transform.position = doorOpenPos; + } // Возвращаем свет в спокойный зеленый/бирюзовый if (emergencyLight != null) diff --git a/Assets/Scripts/Editor/DeathScreenBuilder.cs b/Assets/Scripts/Editor/DeathScreenBuilder.cs index d25cf8b..01b5962 100644 --- a/Assets/Scripts/Editor/DeathScreenBuilder.cs +++ b/Assets/Scripts/Editor/DeathScreenBuilder.cs @@ -131,6 +131,9 @@ public static class DeathScreenBuilder deathUI.fadeDuration = 0.8f; deathUI.mainMenuSceneName = "MainMenu"; + UnityEditor.Events.UnityEventTools.AddPersistentListener(restartBtn.onClick, deathUI.RestartGame); + UnityEditor.Events.UnityEventTools.AddPersistentListener(mainMenuBtn.onClick, deathUI.ReturnToMainMenu); + // По умолчанию скрываем панель смерти deathPanel.SetActive(false); diff --git a/Assets/Scripts/Editor/Level2SceneBuilder.cs b/Assets/Scripts/Editor/Level2SceneBuilder.cs index 0ea59d3..b3ed43b 100644 --- a/Assets/Scripts/Editor/Level2SceneBuilder.cs +++ b/Assets/Scripts/Editor/Level2SceneBuilder.cs @@ -717,6 +717,9 @@ public static class Level2SceneBuilder victoryComp.GetType().GetField("mainMenuButton", flags)?.SetValue(victoryComp, btnMenu); victoryComp.GetType().GetField("restartButton", flags)?.SetValue(victoryComp, btnRestart); + UnityEditor.Events.UnityEventTools.AddPersistentListener(btnMenu.onClick, victoryComp.OnMainMenuClicked); + UnityEditor.Events.UnityEventTools.AddPersistentListener(btnRestart.onClick, victoryComp.OnRestartGameClicked); + root.SetActive(false); } diff --git a/Assets/Scripts/Editor/PauseMenuBuilder.cs b/Assets/Scripts/Editor/PauseMenuBuilder.cs index fc1131f..6f37382 100644 --- a/Assets/Scripts/Editor/PauseMenuBuilder.cs +++ b/Assets/Scripts/Editor/PauseMenuBuilder.cs @@ -228,6 +228,15 @@ public static class PauseMenuBuilder pauseMenu.backFromSettingsButton = backBtn; pauseMenu.resetDefaultsButton = resetBtn; + // Привязываем обработчики через UnityEvent для отображения в Инспекторе + UnityEditor.Events.UnityEventTools.AddPersistentListener(resumeBtn.onClick, pauseMenu.ResumeGame); + UnityEditor.Events.UnityEventTools.AddPersistentListener(settingsBtn.onClick, pauseMenu.OpenSettings); + UnityEditor.Events.UnityEventTools.AddPersistentListener(restartBtn.onClick, pauseMenu.RestartGame); + UnityEditor.Events.UnityEventTools.AddPersistentListener(menuBtn.onClick, pauseMenu.ReturnToMainMenu); + UnityEditor.Events.UnityEventTools.AddPersistentListener(quitBtn.onClick, pauseMenu.QuitGame); + UnityEditor.Events.UnityEventTools.AddPersistentListener(backBtn.onClick, pauseMenu.CloseSettings); + UnityEditor.Events.UnityEventTools.AddPersistentListener(resetBtn.onClick, pauseMenu.ResetToDefaults); + pauseMenu.volumeSlider = volSlider; pauseMenu.volumeValueText = volText; pauseMenu.muteToggle = muteToggle; diff --git a/Assets/Scripts/Editor/SynthesiaSystemTests.cs b/Assets/Scripts/Editor/SynthesiaSystemTests.cs new file mode 100644 index 0000000..c856c45 --- /dev/null +++ b/Assets/Scripts/Editor/SynthesiaSystemTests.cs @@ -0,0 +1,30 @@ +using NUnit.Framework; +using UnityEngine; + +public class SynthesiaSystemTests +{ + [Test] + public void BossArena_UnlocksDoors_WhenTitanHealthReachesZero() + { + // Arrange (Настройка тестового окружения арены и босса) + var arenaObj = new GameObject("BossArena"); + var arenaController = arenaObj.AddComponent(); + + var bossObj = new GameObject("TitanBoss"); + var bossHealth = bossObj.AddComponent(); + bossHealth.SetMaxHealthForTest(200f); + arenaController.BindBossForTest(bossHealth); + arenaController.LockArenaDoors(); + + // Act (Нанесение летального урона боссу) + bossHealth.TakeDamage(200f); + + // Assert (Проверка разблокировки гермозатворов арены) + Assert.AreEqual(0f, bossHealth.CurrentHealth); + Assert.IsFalse(arenaController.AreDoorsLocked); + + // Cleanup + if (arenaObj != null) Object.DestroyImmediate(arenaObj); + if (bossObj != null) Object.DestroyImmediate(bossObj); + } +} diff --git a/Assets/Scripts/Editor/SynthesiaSystemTests.cs.meta b/Assets/Scripts/Editor/SynthesiaSystemTests.cs.meta new file mode 100644 index 0000000..b97e7fc --- /dev/null +++ b/Assets/Scripts/Editor/SynthesiaSystemTests.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 92d8d8af5a5c5944d88bc01ff770d954 \ No newline at end of file diff --git a/Assets/Scripts/FinalVictoryUI.cs b/Assets/Scripts/FinalVictoryUI.cs index 23ab157..6e3f2cc 100644 --- a/Assets/Scripts/FinalVictoryUI.cs +++ b/Assets/Scripts/FinalVictoryUI.cs @@ -61,13 +61,13 @@ public class FinalVictoryUI : MonoBehaviour GameAudioSynthesizer.PlaySuccessChime(); } - private void OnRestartGameClicked() + public void OnRestartGameClicked() { Time.timeScale = 1f; SceneManager.LoadScene("SampleScene"); // Начать с 1-го уровня } - private void OnMainMenuClicked() + public void OnMainMenuClicked() { Time.timeScale = 1f; SceneManager.LoadScene("MainMenu"); diff --git a/Assets/Scripts/IntroCutsceneAudio.cs b/Assets/Scripts/IntroCutsceneAudio.cs new file mode 100644 index 0000000..871f28a --- /dev/null +++ b/Assets/Scripts/IntroCutsceneAudio.cs @@ -0,0 +1,287 @@ +using UnityEngine; + +/// +/// Процедурный генератор звуковых эффектов и атмосферы для вступительной кат-сцены «Синтезия». +/// Все звуки генерируются программно в памяти (AudioClip.Create) и не требуют внешних файлов. +/// +public static class IntroCutsceneAudio +{ + private static int sampleRate = 44100; + + /// + /// Низкий давящий гул заброшенного подземного бункера (зацикленный) + /// + public static AudioClip CreateBunkerHumClip(float duration = 6f) + { + int samples = (int)(sampleRate * duration); + float[] data = new float[samples]; + System.Random rnd = new System.Random(1337); + + float lastNoise = 0f; + for (int i = 0; i < samples; i++) + { + float t = (float)i / sampleRate; + // Низкочастотный рокот бункера: 45 Гц + 68 Гц с биениями + float sub = Mathf.Sin(2f * Mathf.PI * 45f * t) * 0.45f; + float drone = Mathf.Sin(2f * Mathf.PI * 68f * t + Mathf.Sin(2f * Mathf.PI * 0.4f * t)) * 0.25f; + + // Фильтрованный низкочастотный шум воздуха в вентиляции + float white = ((float)rnd.NextDouble() * 2f - 1f) * 0.15f; + lastNoise = Mathf.Lerp(lastNoise, white, 0.04f); + + // Бесшовное зацикливание по краям + float edgeEnv = 1f; + float edgeTime = 0.5f; + if (t < edgeTime) edgeEnv = t / edgeTime; + else if (t > duration - edgeTime) edgeEnv = (duration - t) / edgeTime; + + data[i] = (sub + drone + lastNoise) * edgeEnv * 0.7f; + } + + AudioClip clip = AudioClip.Create("BunkerHum", samples, 1, sampleRate, false); + clip.SetData(data, 0); + return clip; + } + + /// + /// Глухой ритмичный стук сердца (двойной удар тук-тук) + /// + public static AudioClip CreateHeartbeatClip(float bpm = 65f) + { + float period = 60f / bpm; + int samples = (int)(sampleRate * period); + float[] data = new float[samples]; + + for (int i = 0; i < samples; i++) + { + float t = (float)i / sampleRate; + float val = 0f; + + // Первый удар (Систола, 0.0с - 0.18с) + if (t < 0.20f) + { + float localT = t / 0.20f; + float env = Mathf.Sin(localT * Mathf.PI) * Mathf.Exp(-localT * 3.5f); + float freq = Mathf.Lerp(65f, 38f, localT); + val += Mathf.Sin(2f * Mathf.PI * freq * t) * env * 0.85f; + } + + // Второй удар (Диастола, 0.24с - 0.44с) + float t2 = t - 0.24f; + if (t2 >= 0f && t2 < 0.20f) + { + float localT = t2 / 0.20f; + float env = Mathf.Sin(localT * Mathf.PI) * Mathf.Exp(-localT * 4.0f); + float freq = Mathf.Lerp(55f, 34f, localT); + val += Mathf.Sin(2f * Mathf.PI * freq * t2) * env * 0.65f; + } + + data[i] = Mathf.Clamp(val, -1f, 1f); + } + + AudioClip clip = AudioClip.Create("Heartbeat", samples, 1, sampleRate, false); + clip.SetData(data, 0); + return clip; + } + + /// + /// Пиканье кардиомонитора (медицинский зуммер) + /// + public static AudioClip CreateHeartMonitorBeepClip() + { + float duration = 0.14f; + int samples = (int)(sampleRate * duration); + float[] data = new float[samples]; + + for (int i = 0; i < samples; i++) + { + float t = (float)i / samples; + float env = Mathf.Sin(t * Mathf.PI); + // Чистый чирп частоты 940 Гц + float tone = Mathf.Sin(2f * Mathf.PI * 940f * ((float)i / sampleRate)); + data[i] = tone * env * 0.35f; + } + + AudioClip clip = AudioClip.Create("HeartMonitorBeep", samples, 1, sampleRate, false); + clip.SetData(data, 0); + return clip; + } + + /// + /// Скрежет ногтей по стене и искаженный стон безумия + /// + public static AudioClip CreateScratchAndGroanClip() + { + float duration = 3.2f; + int samples = (int)(sampleRate * duration); + float[] data = new float[samples]; + System.Random rnd = new System.Random(42); + + float lastVal = 0f; + for (int i = 0; i < samples; i++) + { + float t = (float)i / sampleRate; + + // Скрежет ногтей по бетону (высокочастотный фрикционный скрежет) + float scratchNoise = ((float)rnd.NextDouble() * 2f - 1f); + float scratchFilt = scratchNoise - lastVal; + lastVal = scratchNoise * 0.45f; + float scratchMod = Mathf.Sin(2f * Mathf.PI * 7.5f * t) * 0.5f + 0.5f; + float scratch = scratchFilt * scratchMod * 0.22f; + + // Заглушенный утробный стон + float groanEnv = Mathf.Sin(Mathf.Clamp01(t / 2.8f) * Mathf.PI); + float groanFreq = Mathf.Lerp(140f, 90f, t / 3.2f) + Mathf.Sin(2f * Mathf.PI * 5f * t) * 12f; + float groan = Mathf.Sin(2f * Mathf.PI * groanFreq * t) * groanEnv * 0.35f; + + data[i] = (scratch + groan) * 0.75f; + } + + AudioClip clip = AudioClip.Create("ScratchGroan", samples, 1, sampleRate, false); + clip.SetData(data, 0); + return clip; + } + + /// + /// Скрип сжатого в руке металла + /// + public static AudioClip CreateMetalGripClip() + { + float duration = 1.4f; + int samples = (int)(sampleRate * duration); + float[] data = new float[samples]; + + for (int i = 0; i < samples; i++) + { + float t = (float)i / samples; + float env = Mathf.Sin(t * Mathf.PI) * Mathf.Exp(-t * 2.2f); + // Высокий металлический скрип напряжения + float creak = Mathf.Sin(2f * Mathf.PI * (1450f + Mathf.Sin(t * 40f) * 350f) * ((float)i / sampleRate)); + float lowClank = Mathf.Sin(2f * Mathf.PI * 220f * ((float)i / sampleRate)) * Mathf.Exp(-t * 8f); + data[i] = (creak * 0.25f + lowClank * 0.45f) * env; + } + + AudioClip clip = AudioClip.Create("MetalGrip", samples, 1, sampleRate, false); + clip.SetData(data, 0); + return clip; + } + + /// + /// Гортанный хищный рык мутанта вдалеке + /// + public static AudioClip CreateDistantGrowlClip() + { + float duration = 2.4f; + int samples = (int)(sampleRate * duration); + float[] data = new float[samples]; + System.Random rnd = new System.Random(999); + + for (int i = 0; i < samples; i++) + { + float t = (float)i / sampleRate; + float env = Mathf.Sin(Mathf.Clamp01(t / 2.4f) * Mathf.PI); + + // Вибрирующий гортанный рык + float am = Mathf.Sin(2f * Mathf.PI * 28f * t) * 0.5f + 0.5f; + float freq = Mathf.Lerp(110f, 65f, t / 2.4f); + float tone = Mathf.Sin(2f * Mathf.PI * freq * t) * am; + float noise = ((float)rnd.NextDouble() * 2f - 1f) * 0.35f * am; + + data[i] = (tone * 0.6f + noise * 0.4f) * env * 0.65f; + } + + AudioClip clip = AudioClip.Create("DistantGrowl", samples, 1, sampleRate, false); + clip.SetData(data, 0); + return clip; + } + + /// + /// Оглушительный удар металла о стену + /// + public static AudioClip CreateMetalClangClip() + { + float duration = 1.8f; + int samples = (int)(sampleRate * duration); + float[] data = new float[samples]; + System.Random rnd = new System.Random(555); + + for (int i = 0; i < samples; i++) + { + float t = (float)i / samples; + // Ударный импульс + float impEnv = Mathf.Exp(-t * 22f); + float ringEnv = Mathf.Exp(-t * 3.5f); + + float noise = ((float)rnd.NextDouble() * 2f - 1f) * impEnv * 0.8f; + // Металлические гармоники гаечного ключа (звон 440, 880, 1320, 2400 Гц) + float tone1 = Mathf.Sin(2f * Mathf.PI * 520f * ((float)i / sampleRate)); + float tone2 = Mathf.Sin(2f * Mathf.PI * 1150f * ((float)i / sampleRate)); + float tone3 = Mathf.Sin(2f * Mathf.PI * 2350f * ((float)i / sampleRate)); + + float harmonics = (tone1 * 0.45f + tone2 * 0.35f + tone3 * 0.2f) * ringEnv; + data[i] = (noise + harmonics) * 0.9f; + } + + AudioClip clip = AudioClip.Create("MetalClang", samples, 1, sampleRate, false); + clip.SetData(data, 0); + return clip; + } + + /// + /// Яростный визг мутанта при броске + /// + public static AudioClip CreateFuriousScreechClip() + { + float duration = 1.6f; + int samples = (int)(sampleRate * duration); + float[] data = new float[samples]; + System.Random rnd = new System.Random(777); + + for (int i = 0; i < samples; i++) + { + float t = (float)i / samples; + float env = Mathf.Sin(t * Mathf.PI) * Mathf.Exp(-t * 1.8f); + + // Резкий частотный спад от 1600 Гц до 450 Гц с жестким дисторшном + float freq = Mathf.Lerp(1600f, 450f, t); + float tone = Mathf.Sin(2f * Mathf.PI * freq * ((float)i / sampleRate)); + float noise = ((float)rnd.NextDouble() * 2f - 1f) * 0.4f; + + float raw = (tone + noise) * env * 1.5f; + data[i] = Mathf.Clamp(raw, -0.9f, 0.9f); // Сатурация + } + + AudioClip clip = AudioClip.Create("FuriousScreech", samples, 1, sampleRate, false); + clip.SetData(data, 0); + return clip; + } + + /// + /// Низкий басовый кинематографичный удар (Cinematic Boom) под появление логотипа SYNTHESIA + /// + public static AudioClip CreateCinematicBoomClip() + { + float duration = 3.5f; + int samples = (int)(sampleRate * duration); + float[] data = new float[samples]; + + for (int i = 0; i < samples; i++) + { + float t = (float)i / samples; + // Ударный спад + float subEnv = Mathf.Exp(-t * 1.6f); + // Скольжение частоты саб-баса: 110 Гц -> 36 Гц + float freq = Mathf.Lerp(110f, 36f, Mathf.Pow(t, 0.6f)); + float sub = Mathf.Sin(2f * Mathf.PI * freq * ((float)i / sampleRate)); + + // Теплый обертон + float harmonic = Mathf.Sin(2f * Mathf.PI * (freq * 2.05f) * ((float)i / sampleRate)) * 0.35f; + + data[i] = (sub + harmonic) * subEnv * 0.95f; + } + + AudioClip clip = AudioClip.Create("CinematicBoom", samples, 1, sampleRate, false); + clip.SetData(data, 0); + return clip; + } +} diff --git a/Assets/Scripts/IntroCutsceneAudio.cs.meta b/Assets/Scripts/IntroCutsceneAudio.cs.meta new file mode 100644 index 0000000..9cc9d91 --- /dev/null +++ b/Assets/Scripts/IntroCutsceneAudio.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 7c073a1fb92fdf0429c28fd777896fdf \ No newline at end of file diff --git a/Assets/Scripts/IntroCutsceneController.cs b/Assets/Scripts/IntroCutsceneController.cs new file mode 100644 index 0000000..5a469de --- /dev/null +++ b/Assets/Scripts/IntroCutsceneController.cs @@ -0,0 +1,642 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.InputSystem; + +/// +/// Контроллер вступительной кат-сцены «Синтезия» (2D-арты / слайд-шоу). +/// Воспроизводит 5 атмосферных иллюстрированных кадров с эффектом Ken Burns (панорамирование/зум), +/// плавными растворениями (cross-fade), процедурным звуковым сопровождением и финальным логотипом. +/// +public class IntroCutsceneController : MonoBehaviour +{ + private static IntroCutsceneController _instance; + public static IntroCutsceneController Instance => _instance; + + [Header("Спрайты кадров")] + public Sprite frame1Sprite; + public Sprite frame2Sprite; + public Sprite frame3Sprite; + public Sprite frame4Sprite; + public Sprite frame5Sprite; + public Sprite frameTitleSprite; + + [Header("Слои отображения изображений")] + public CanvasGroup cutsceneRootGroup; + public Image imageLayerA; + public Image imageLayerB; + public CanvasGroup layerAGroup; + public CanvasGroup layerBGroup; + + [Header("Интерфейс субтитров")] + public CanvasGroup subtitleGroup; + public Text speakerLabelText; + public Text subtitleBodyText; + + [Header("Подсказка пропуска")] + public CanvasGroup skipPromptGroup; + public Text skipPromptText; + + [Header("Аудио источники")] + public AudioSource ambienceSource; + public AudioSource heartbeatSource; + public AudioSource sfxSource; + + [Header("Состояние")] + public bool isPlaying = false; + private bool isSkipping = false; + private Coroutine cutsceneCoroutine; + private PlayerMovement cachedPlayerMovement; + + public class CutsceneSceneData + { + public Sprite sprite; + public string speaker; + public string subtitle; + public float duration; + public float zoomStart; + public float zoomEnd; + public Vector2 panOffsetStart; + public Vector2 panOffsetEnd; + public System.Action onStartAction; + } + + private List scenes = new List(); + + private void Awake() + { + _instance = this; + } + + private void Start() + { + // По умолчанию скрываем до запуска + if (cutsceneRootGroup != null) + { + cutsceneRootGroup.alpha = 0f; + cutsceneRootGroup.blocksRaycasts = false; + } + + // Автоматически запускаем кат-сцену при старте, если не была просмотрена + // или если активен флаг принудительного воспроизведения + bool shouldPlay = PlayerPrefs.GetInt("PlayIntroCutscene", 1) == 1; + if (shouldPlay) + { + StartCoroutine(RoutineAutoPlayOnStart()); + } + } + + private IEnumerator RoutineAutoPlayOnStart() + { + yield return null; // ждем 1 кадр для инициализации всех систем игрока + PlayCutscene(); + } + + /// + /// Запуск кат-сцены + /// + public void PlayCutscene() + { + if (isPlaying) return; + isPlaying = true; + isSkipping = false; + + // Блокируем движение игрока на время кат-сцены + cachedPlayerMovement = FindAnyObjectByType(); + if (cachedPlayerMovement != null) + { + cachedPlayerMovement.enabled = false; + } + + var gun = FindAnyObjectByType(); + if (gun != null) gun.enabled = false; + + var attack = FindAnyObjectByType(); + if (attack != null) attack.enabled = false; + + LoadSpritesIfNull(); + PrepareSceneData(); + + if (cutsceneCoroutine != null) StopCoroutine(cutsceneCoroutine); + cutsceneCoroutine = StartCoroutine(RoutineCutsceneSequence()); + } + + private void LoadSpritesIfNull() + { + if (frame1Sprite == null) frame1Sprite = Resources.Load("Cutscene/frame_1") ?? LoadSpriteFromAsset("Assets/Textures/Cutscene/frame_1.jpg"); + if (frame2Sprite == null) frame2Sprite = Resources.Load("Cutscene/frame_2") ?? LoadSpriteFromAsset("Assets/Textures/Cutscene/frame_2.jpg"); + if (frame3Sprite == null) frame3Sprite = Resources.Load("Cutscene/frame_3") ?? LoadSpriteFromAsset("Assets/Textures/Cutscene/frame_3.jpg"); + if (frame4Sprite == null) frame4Sprite = Resources.Load("Cutscene/frame_4") ?? LoadSpriteFromAsset("Assets/Textures/Cutscene/frame_4.jpg"); + if (frame5Sprite == null) frame5Sprite = Resources.Load("Cutscene/frame_5") ?? LoadSpriteFromAsset("Assets/Textures/Cutscene/frame_5.jpg"); + if (frameTitleSprite == null) frameTitleSprite = Resources.Load("Cutscene/frame_title") ?? LoadSpriteFromAsset("Assets/Textures/Cutscene/frame_title.jpg"); + } + + private Sprite LoadSpriteFromAsset(string path) + { +#if UNITY_EDITOR + return UnityEditor.AssetDatabase.LoadAssetAtPath(path); +#else + return null; +#endif + } + + private void PrepareSceneData() + { + scenes.Clear(); + + // КАДР 1: ОПЕРАЦИОННАЯ + scenes.Add(new CutsceneSceneData + { + sprite = frame1Sprite, + speaker = "ГОЛОС ГГ", + subtitle = "Проект «Синтезия». Они выключили свет и забрали наши глаза, надеясь, что звук станет нашим новым зрением.", + duration = 7.5f, + zoomStart = 1.0f, + zoomEnd = 1.10f, + panOffsetStart = new Vector2(0f, -10f), + panOffsetEnd = new Vector2(0f, 15f), + onStartAction = () => + { + // Запускаем фоновый гул и пиканье монитора + StartAmbienceAndHeartbeat(); + StartCoroutine(RoutineHeartMonitorBeeps(7.5f)); + } + }); + + // КАДР 2: БЕЗУМИЕ ВО ТЬМЕ + scenes.Add(new CutsceneSceneData + { + sprite = frame2Sprite, + speaker = "ГОЛОС ГГ", + subtitle = "Но чуда не вышло. Темнота свела их с ума, оставив наедине с обостренным, невыносимым слухом.", + duration = 7.0f, + zoomStart = 1.05f, + zoomEnd = 1.08f, + panOffsetStart = new Vector2(-15f, 0f), + panOffsetEnd = new Vector2(10f, 0f), + onStartAction = () => + { + // Скрежет ногтей по стене и стон + if (sfxSource != null) + { + sfxSource.PlayOneShot(IntroCutsceneAudio.CreateScratchAndGroanClip(), 0.9f); + } + } + }); + + // КАДР 3: ПРОБУЖДЕНИЕ ГГ + scenes.Add(new CutsceneSceneData + { + sprite = frame3Sprite, + speaker = "ГОЛОС ГГ", + subtitle = "Я не знаю, почему выжил только мой разум. Но теперь каждый шорох для меня — это вспышка света.", + duration = 7.5f, + zoomStart = 1.0f, + zoomEnd = 1.11f, + panOffsetStart = new Vector2(0f, -20f), + panOffsetEnd = new Vector2(0f, 10f), + onStartAction = () => + { + // Скрип сжатого металла гаечного ключа + if (sfxSource != null) + { + sfxSource.PlayOneShot(IntroCutsceneAudio.CreateMetalGripClip(), 0.85f); + } + } + }); + + // КАДР 4: УГРОЗА + scenes.Add(new CutsceneSceneData + { + sprite = frame4Sprite, + speaker = "ГОЛОС ГГ", + subtitle = "Чтобы видеть путь — мне нужно шуметь.", + duration = 6.2f, + zoomStart = 1.12f, + zoomEnd = 1.0f, + panOffsetStart = new Vector2(0f, 20f), + panOffsetEnd = new Vector2(0f, 0f), + onStartAction = () => + { + // Гортанный рык мутанта вдалеке + if (sfxSource != null) + { + sfxSource.PlayOneShot(IntroCutsceneAudio.CreateDistantGrowlClip(), 0.95f); + } + } + }); + + // КАДР 5: ДЕЙСТВИЕ И ЛОГОТИП + scenes.Add(new CutsceneSceneData + { + sprite = frame5Sprite, + speaker = "ГОЛОС ГГ", + subtitle = "Но каждый звук привлекает тех, кто остался во тьме навсегда.", + duration = 6.5f, + zoomStart = 1.02f, + zoomEnd = 1.12f, + panOffsetStart = new Vector2(-25f, -10f), + panOffsetEnd = new Vector2(25f, 10f), + onStartAction = () => + { + // ГРОМКИЙ УДАР МЕТАЛЛА И ВИЗГ МУТАНТА + if (sfxSource != null) + { + sfxSource.PlayOneShot(IntroCutsceneAudio.CreateMetalClangClip(), 1.0f); + sfxSource.PlayOneShot(IntroCutsceneAudio.CreateFuriousScreechClip(), 0.85f); + } + } + }); + + // ФИНАЛ: ЛОГОТИП SYNTHESIA + scenes.Add(new CutsceneSceneData + { + sprite = frameTitleSprite, + speaker = "", + subtitle = "", + duration = 5.0f, + zoomStart = 1.0f, + zoomEnd = 1.05f, + panOffsetStart = Vector2.zero, + panOffsetEnd = Vector2.zero, + onStartAction = () => + { + // Низкий басовый кинематографичный удар (Cinematic Boom) + if (sfxSource != null) + { + sfxSource.PlayOneShot(IntroCutsceneAudio.CreateCinematicBoomClip(), 1.0f); + } + } + }); + } + + private void StartAmbienceAndHeartbeat() + { + if (ambienceSource != null) + { + ambienceSource.clip = IntroCutsceneAudio.CreateBunkerHumClip(6f); + ambienceSource.loop = true; + ambienceSource.volume = 0.55f; + ambienceSource.Play(); + } + + if (heartbeatSource != null) + { + heartbeatSource.clip = IntroCutsceneAudio.CreateHeartbeatClip(62f); + heartbeatSource.loop = true; + heartbeatSource.volume = 0.65f; + heartbeatSource.Play(); + } + } + + private IEnumerator RoutineHeartMonitorBeeps(float duration) + { + float timer = 0f; + AudioClip beep = IntroCutsceneAudio.CreateHeartMonitorBeepClip(); + + while (timer < duration && !isSkipping) + { + if (sfxSource != null) + { + sfxSource.PlayOneShot(beep, 0.4f); + } + yield return new WaitForSeconds(1.15f); + timer += 1.15f; + } + } + + private IEnumerator RoutineCutsceneSequence() + { + // 1. Показываем корневой холст кат-сцены + cutsceneRootGroup.alpha = 1f; + cutsceneRootGroup.blocksRaycasts = true; + + if (skipPromptGroup != null) + { + skipPromptGroup.alpha = 0.75f; + } + + bool useLayerA = true; + + for (int i = 0; i < scenes.Count; i++) + { + if (isSkipping) break; + + var scene = scenes[i]; + + // Назначаем спрайт на активный слой + Image activeImg = useLayerA ? imageLayerA : imageLayerB; + Image inactiveImg = useLayerA ? imageLayerB : imageLayerA; + CanvasGroup activeGroup = useLayerA ? layerAGroup : layerBGroup; + CanvasGroup inactiveGroup = useLayerA ? layerBGroup : layerAGroup; + + activeImg.sprite = scene.sprite; + activeImg.rectTransform.localScale = Vector3.one * scene.zoomStart; + activeImg.rectTransform.anchoredPosition = scene.panOffsetStart; + + // Вызываем звуковой триггер кадра + scene.onStartAction?.Invoke(); + + // Обновляем субтитры + UpdateSubtitles(scene.speaker, scene.subtitle); + + // Плавное перетекание (Cross-fade) + float crossFadeDuration = (i == 0) ? 1.5f : 1.1f; + float elapsed = 0f; + + while (elapsed < crossFadeDuration) + { + if (isSkipping) yield break; + + elapsed += Time.deltaTime; + float t = Mathf.Clamp01(elapsed / crossFadeDuration); + activeGroup.alpha = t; + inactiveGroup.alpha = 1f - t; + yield return null; + } + + activeGroup.alpha = 1f; + inactiveGroup.alpha = 0f; + + // Анимация кадра Ken Burns (панорама и наезд камеры) + float sceneElapsed = 0f; + float totalDuration = scene.duration; + + while (sceneElapsed < totalDuration) + { + if (isSkipping) yield break; + + sceneElapsed += Time.deltaTime; + float progress = Mathf.Clamp01(sceneElapsed / totalDuration); + + // Плавная интерполяция масштаба и смещения + float currentZoom = Mathf.Lerp(scene.zoomStart, scene.zoomEnd, progress); + Vector2 currentPan = Vector2.Lerp(scene.panOffsetStart, scene.panOffsetEnd, progress); + + activeImg.rectTransform.localScale = Vector3.one * currentZoom; + activeImg.rectTransform.anchoredPosition = currentPan; + + yield return null; + } + + // Переключаем слой для следующего кадра + useLayerA = !useLayerA; + } + + // Финальный переход в игру + yield return StartCoroutine(RoutineEndCutscene()); + } + + private void UpdateSubtitles(string speaker, string text) + { + if (subtitleGroup == null) return; + + if (string.IsNullOrEmpty(text)) + { + subtitleGroup.alpha = 0f; + return; + } + + subtitleGroup.alpha = 1f; + if (speakerLabelText != null) + { + speakerLabelText.text = speaker; + } + + if (subtitleBodyText != null) + { + subtitleBodyText.text = text; + } + } + + private void Update() + { + if (!isPlaying || isSkipping) return; + + // Пропуск по клавишам ПРОБЕЛ, ESC или ENTER + var keyboard = Keyboard.current; + if (keyboard != null) + { + if (keyboard.spaceKey.wasPressedThisFrame || keyboard.escapeKey.wasPressedThisFrame || keyboard.enterKey.wasPressedThisFrame) + { + SkipCutscene(); + } + } + } + + public void SkipCutscene() + { + if (isSkipping || !isPlaying) return; + isSkipping = true; + + if (cutsceneCoroutine != null) StopCoroutine(cutsceneCoroutine); + StartCoroutine(RoutineEndCutscene()); + } + + private IEnumerator RoutineEndCutscene() + { + // Плавное затухание в темноту + float fadeOut = 1.0f; + float elapsed = 0f; + float startAlpha = cutsceneRootGroup != null ? cutsceneRootGroup.alpha : 1f; + + // Плавное затухание эмбиента + float startAmbienceVol = ambienceSource != null ? ambienceSource.volume : 0f; + float startHeartVol = heartbeatSource != null ? heartbeatSource.volume : 0f; + + while (elapsed < fadeOut) + { + elapsed += Time.deltaTime; + float t = Mathf.Clamp01(elapsed / fadeOut); + + if (cutsceneRootGroup != null) cutsceneRootGroup.alpha = Mathf.Lerp(startAlpha, 0f, t); + if (ambienceSource != null) ambienceSource.volume = Mathf.Lerp(startAmbienceVol, 0f, t); + if (heartbeatSource != null) heartbeatSource.volume = Mathf.Lerp(startHeartVol, 0f, t); + + yield return null; + } + + if (ambienceSource != null) ambienceSource.Stop(); + if (heartbeatSource != null) heartbeatSource.Stop(); + + if (cutsceneRootGroup != null) + { + cutsceneRootGroup.alpha = 0f; + cutsceneRootGroup.blocksRaycasts = false; + } + + isPlaying = false; + isSkipping = false; + + // Помечаем, что кат-сцена была просмотрена + PlayerPrefs.SetInt("PlayIntroCutscene", 0); + PlayerPrefs.Save(); + + // Возвращаем управление игроку + if (cachedPlayerMovement != null) cachedPlayerMovement.enabled = true; + + var gun = FindAnyObjectByType(); + if (gun != null) gun.enabled = true; + + var attack = FindAnyObjectByType(); + if (attack != null) attack.enabled = true; + + // Финальная вспышка эхолокации в месте старта игрока (мир оживает желтым звуковым пульсом) + var player = GameObject.FindWithTag("Player") ?? GameObject.Find("Player"); + if (player != null && EchoTrigger.Instance != null) + { + EchoTrigger.Instance.TriggerExternalWave(player.transform.position, 25f, 3.2f); + } + + Debug.Log("[IntroCutscene] Кат-сцена завершена. Управление передано игроку!"); + } + + /// + /// Фабричный метод создания всего UI и компонентов кат-сцены + /// + public static IntroCutsceneController Create(Transform parentCanvas) + { + var old = parentCanvas.Find("IntroCutsceneRoot"); + if (old != null) DestroyImmediate(old.gameObject); + + // 1. Корневой контейнер + GameObject root = new GameObject("IntroCutsceneRoot", typeof(RectTransform), typeof(CanvasGroup)); + root.transform.SetParent(parentCanvas, false); + + RectTransform rootRt = root.GetComponent(); + rootRt.anchorMin = Vector2.zero; + rootRt.anchorMax = Vector2.one; + rootRt.sizeDelta = Vector2.zero; + + // Черный глухой фон + Image bgImg = root.AddComponent(); + bgImg.color = Color.black; + + // 2. Слой A (для перетекания) + GameObject layerA = new GameObject("ImageLayerA", typeof(RectTransform), typeof(CanvasRenderer), typeof(Image), typeof(CanvasGroup)); + layerA.transform.SetParent(root.transform, false); + RectTransform layerARt = layerA.GetComponent(); + layerARt.anchorMin = Vector2.zero; + layerARt.anchorMax = Vector2.one; + layerARt.sizeDelta = Vector2.zero; + Image imgA = layerA.GetComponent(); + imgA.preserveAspect = true; + CanvasGroup groupA = layerA.GetComponent(); + groupA.alpha = 0f; + + // 3. Слой B (для перетекания) + GameObject layerB = new GameObject("ImageLayerB", typeof(RectTransform), typeof(CanvasRenderer), typeof(Image), typeof(CanvasGroup)); + layerB.transform.SetParent(root.transform, false); + RectTransform layerBRt = layerB.GetComponent(); + layerBRt.anchorMin = Vector2.zero; + layerBRt.anchorMax = Vector2.one; + layerBRt.sizeDelta = Vector2.zero; + Image imgB = layerB.GetComponent(); + imgB.preserveAspect = true; + CanvasGroup groupB = layerB.GetComponent(); + groupB.alpha = 0f; + + // 4. Панель субтитров + Font defaultFont = Resources.GetBuiltinResource("LegacyRuntime.ttf"); + + GameObject subPanel = new GameObject("SubtitlePanel", typeof(RectTransform), typeof(CanvasRenderer), typeof(Image), typeof(CanvasGroup)); + subPanel.transform.SetParent(root.transform, false); + RectTransform subRt = subPanel.GetComponent(); + subRt.anchorMin = new Vector2(0.08f, 0.04f); + subRt.anchorMax = new Vector2(0.92f, 0.22f); + subRt.sizeDelta = Vector2.zero; + + Image subBg = subPanel.GetComponent(); + subBg.color = new Color(0.03f, 0.03f, 0.04f, 0.78f); + Outline subOutline = subPanel.AddComponent(); + subOutline.effectColor = new Color(0.85f, 0.75f, 0.25f, 0.25f); + subOutline.effectDistance = new Vector2(1f, -1f); + + // Имя говорящего + GameObject speakerObj = new GameObject("SpeakerLabel", typeof(RectTransform), typeof(CanvasRenderer), typeof(Text)); + speakerObj.transform.SetParent(subPanel.transform, false); + RectTransform spkRt = speakerObj.GetComponent(); + spkRt.anchorMin = new Vector2(0f, 0.65f); + spkRt.anchorMax = new Vector2(1f, 1.0f); + spkRt.offsetMin = new Vector2(20f, 0f); + spkRt.offsetMax = new Vector2(-20f, -8f); + + Text spkText = speakerObj.GetComponent(); + spkText.font = defaultFont; + spkText.fontSize = 15; + spkText.fontStyle = FontStyle.Bold; + spkText.alignment = TextAnchor.MiddleCenter; + spkText.color = new Color(0.95f, 0.8f, 0.25f, 1.0f); + spkText.text = "ГОЛОС ГГ"; + + // Текст субтитров + GameObject subTextObj = new GameObject("SubtitleText", typeof(RectTransform), typeof(CanvasRenderer), typeof(Text)); + subTextObj.transform.SetParent(subPanel.transform, false); + RectTransform stRt = subTextObj.GetComponent(); + stRt.anchorMin = new Vector2(0f, 0f); + stRt.anchorMax = new Vector2(1f, 0.65f); + stRt.offsetMin = new Vector2(30f, 8f); + stRt.offsetMax = new Vector2(-30f, 0f); + + Text subBody = subTextObj.GetComponent(); + subBody.font = defaultFont; + subBody.fontSize = 18; + subBody.lineSpacing = 1.25f; + subBody.alignment = TextAnchor.MiddleCenter; + subBody.color = new Color(0.95f, 0.95f, 0.95f, 0.95f); + subBody.text = "..."; + + // 5. Подсказка пропуска + GameObject skipObj = new GameObject("SkipPrompt", typeof(RectTransform), typeof(CanvasRenderer), typeof(Text), typeof(CanvasGroup)); + skipObj.transform.SetParent(root.transform, false); + RectTransform skipRt = skipObj.GetComponent(); + skipRt.anchorMin = new Vector2(0.68f, 0.015f); + skipRt.anchorMax = new Vector2(0.98f, 0.05f); + skipRt.sizeDelta = Vector2.zero; + + Text skipText = skipObj.GetComponent(); + skipText.font = defaultFont; + skipText.fontSize = 13; + skipText.alignment = TextAnchor.MiddleRight; + skipText.color = new Color(0.7f, 0.7f, 0.7f, 0.75f); + skipText.text = "[ ПРОБЕЛ / ESC : ПРОПУСТИТЬ ]"; + + // 6. Аудио источники + GameObject audioHolder = new GameObject("CutsceneAudioSources"); + audioHolder.transform.SetParent(root.transform, false); + + AudioSource ambSrc = audioHolder.AddComponent(); + ambSrc.playOnAwake = false; + + AudioSource heartSrc = audioHolder.AddComponent(); + heartSrc.playOnAwake = false; + + AudioSource sfxSrc = audioHolder.AddComponent(); + sfxSrc.playOnAwake = false; + + // 7. Сборка компонента + IntroCutsceneController controller = root.AddComponent(); + controller.cutsceneRootGroup = root.GetComponent(); + controller.cutsceneRootGroup.alpha = 0f; + controller.cutsceneRootGroup.blocksRaycasts = false; + + controller.imageLayerA = imgA; + controller.imageLayerB = imgB; + controller.layerAGroup = groupA; + controller.layerBGroup = groupB; + + controller.subtitleGroup = subPanel.GetComponent(); + controller.speakerLabelText = spkText; + controller.subtitleBodyText = subBody; + + controller.skipPromptGroup = skipObj.GetComponent(); + controller.skipPromptText = skipText; + + controller.ambienceSource = ambSrc; + controller.heartbeatSource = heartSrc; + controller.sfxSource = sfxSrc; + + return controller; + } +} diff --git a/Assets/Scripts/IntroCutsceneController.cs.meta b/Assets/Scripts/IntroCutsceneController.cs.meta new file mode 100644 index 0000000..1161948 --- /dev/null +++ b/Assets/Scripts/IntroCutsceneController.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: a4419648d9c86634e8ad97e33b48ef11 \ No newline at end of file diff --git a/Assets/Scripts/LevelSuccessUI.cs b/Assets/Scripts/LevelSuccessUI.cs index b865880..cdba17a 100644 --- a/Assets/Scripts/LevelSuccessUI.cs +++ b/Assets/Scripts/LevelSuccessUI.cs @@ -76,7 +76,7 @@ public class LevelSuccessUI : MonoBehaviour SceneManager.LoadScene("Level2"); } - private void OnMainMenuClicked() + public void OnMainMenuClicked() { Time.timeScale = 1f; SceneManager.LoadScene("MainMenu"); diff --git a/Assets/Scripts/MainMenuManager.cs b/Assets/Scripts/MainMenuManager.cs index 00c2a85..6a2f351 100644 --- a/Assets/Scripts/MainMenuManager.cs +++ b/Assets/Scripts/MainMenuManager.cs @@ -60,6 +60,9 @@ public class MainMenuManager : MonoBehaviour public void PlayGame() { + PlayerPrefs.SetInt("PlayIntroCutscene", 1); + PlayerPrefs.Save(); + if (!string.IsNullOrEmpty(gameSceneName)) { StartCoroutine(LoadSceneRoutine(gameSceneName)); @@ -70,6 +73,13 @@ public class MainMenuManager : MonoBehaviour } } + public void PlayPrologue() + { + PlayerPrefs.SetInt("PlayIntroCutscene", 1); + PlayerPrefs.Save(); + PlayGame(); + } + public void OpenSettings() { if (mainMenuPanel != null) mainMenuPanel.SetActive(false); @@ -135,8 +145,9 @@ public class MainMenuManager : MonoBehaviour { loadingText.text = "Инициализация локации..."; } - yield return new WaitForSecondsRealtime(0.35f); + yield return new WaitForSecondsRealtime(0.2f); asyncLoad.allowSceneActivation = true; + break; } yield return null; diff --git a/Assets/Scripts/MutantHealth.cs b/Assets/Scripts/MutantHealth.cs index ae8eb7d..9833744 100644 --- a/Assets/Scripts/MutantHealth.cs +++ b/Assets/Scripts/MutantHealth.cs @@ -19,6 +19,12 @@ public class MutantHealth : MonoBehaviour mutantAI = GetComponent(); } + public void SetMaxHealthForTest(float val) + { + maxHealth = val; + currentHealth = val; + } + public void TakeDamage(float damage, Transform attacker = null) { if (IsDead) return; @@ -68,6 +74,9 @@ public class MutantHealth : MonoBehaviour col.enabled = false; } - Destroy(gameObject, 3.5f); + if (Application.isPlaying) + { + Destroy(gameObject, 3.5f); + } } } \ No newline at end of file diff --git a/Assets/Textures/Cutscene.meta b/Assets/Textures/Cutscene.meta new file mode 100644 index 0000000..0007627 --- /dev/null +++ b/Assets/Textures/Cutscene.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9c98cdb965b3ddc4399ff1f72bf5af70 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Textures/Cutscene/frame_1.jpg b/Assets/Textures/Cutscene/frame_1.jpg new file mode 100644 index 0000000..3c5a70a --- /dev/null +++ b/Assets/Textures/Cutscene/frame_1.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b18fb2977f6ef5d4c21c9ec4d9564955bd0094b246f358d6119b2b367444fc6 +size 824727 diff --git a/Assets/Textures/Cutscene/frame_1.jpg.meta b/Assets/Textures/Cutscene/frame_1.jpg.meta new file mode 100644 index 0000000..0bd17fb --- /dev/null +++ b/Assets/Textures/Cutscene/frame_1.jpg.meta @@ -0,0 +1,144 @@ +fileFormatVersion: 2 +guid: 517054fce12003148b11b9c17fbc05fd +TextureImporter: + internalIDToNameTable: + - first: + 213: -5020514758781672274 + second: frame_1_0 + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationMethod: 0 + spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: + - serializedVersion: 2 + name: frame_1_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1376 + height: 768 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: ea4663d3d6c835ab0800000000000000 + internalID: -5020514758781672274 + vertices: [] + indices: + edges: [] + weights: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Textures/Cutscene/frame_2.jpg b/Assets/Textures/Cutscene/frame_2.jpg new file mode 100644 index 0000000..ed2c8db --- /dev/null +++ b/Assets/Textures/Cutscene/frame_2.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:42908acc39631807cd9277d2474a1284e3b6894430436f4071dc2b62feca6e26 +size 677810 diff --git a/Assets/Textures/Cutscene/frame_2.jpg.meta b/Assets/Textures/Cutscene/frame_2.jpg.meta new file mode 100644 index 0000000..fa7eae5 --- /dev/null +++ b/Assets/Textures/Cutscene/frame_2.jpg.meta @@ -0,0 +1,144 @@ +fileFormatVersion: 2 +guid: c640f6a1d639a9746a11426b2d7c9a17 +TextureImporter: + internalIDToNameTable: + - first: + 213: -8157403806559461926 + second: frame_2_0 + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationMethod: 0 + spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: + - serializedVersion: 2 + name: frame_2_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1376 + height: 768 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: add9a9c25741bce80800000000000000 + internalID: -8157403806559461926 + vertices: [] + indices: + edges: [] + weights: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Textures/Cutscene/frame_3.jpg b/Assets/Textures/Cutscene/frame_3.jpg new file mode 100644 index 0000000..222954a --- /dev/null +++ b/Assets/Textures/Cutscene/frame_3.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0fe60f21b420a2f714883eb71be524140a6d7fa5c9f9a0b5e5e74655b1559e4 +size 953163 diff --git a/Assets/Textures/Cutscene/frame_3.jpg.meta b/Assets/Textures/Cutscene/frame_3.jpg.meta new file mode 100644 index 0000000..204b30a --- /dev/null +++ b/Assets/Textures/Cutscene/frame_3.jpg.meta @@ -0,0 +1,144 @@ +fileFormatVersion: 2 +guid: e40f8fcbe653d5e42ab8bd52bc46d095 +TextureImporter: + internalIDToNameTable: + - first: + 213: 7393637447140822919 + second: frame_3_0 + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationMethod: 0 + spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: + - serializedVersion: 2 + name: frame_3_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1376 + height: 768 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 78fcad2c51a7b9660800000000000000 + internalID: 7393637447140822919 + vertices: [] + indices: + edges: [] + weights: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Textures/Cutscene/frame_4.jpg b/Assets/Textures/Cutscene/frame_4.jpg new file mode 100644 index 0000000..582d1e3 --- /dev/null +++ b/Assets/Textures/Cutscene/frame_4.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e8bec47cae4ea43b056dc13fa43d6605ee9048532563a9e1dc5415fb28d5deb5 +size 994820 diff --git a/Assets/Textures/Cutscene/frame_4.jpg.meta b/Assets/Textures/Cutscene/frame_4.jpg.meta new file mode 100644 index 0000000..f6a9f97 --- /dev/null +++ b/Assets/Textures/Cutscene/frame_4.jpg.meta @@ -0,0 +1,144 @@ +fileFormatVersion: 2 +guid: 3a76906c786d75c4cac7b05085fc1772 +TextureImporter: + internalIDToNameTable: + - first: + 213: -1635119059196159038 + second: frame_4_0 + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationMethod: 0 + spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: + - serializedVersion: 2 + name: frame_4_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1376 + height: 768 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 2cb542ff0e3ee49e0800000000000000 + internalID: -1635119059196159038 + vertices: [] + indices: + edges: [] + weights: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Textures/Cutscene/frame_5.jpg b/Assets/Textures/Cutscene/frame_5.jpg new file mode 100644 index 0000000..f259905 --- /dev/null +++ b/Assets/Textures/Cutscene/frame_5.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7ba6f590d056d9e0003df88a3f895b993e8164d8314e87d07e92010d2d09e0eb +size 1129990 diff --git a/Assets/Textures/Cutscene/frame_5.jpg.meta b/Assets/Textures/Cutscene/frame_5.jpg.meta new file mode 100644 index 0000000..dd0538c --- /dev/null +++ b/Assets/Textures/Cutscene/frame_5.jpg.meta @@ -0,0 +1,144 @@ +fileFormatVersion: 2 +guid: e6f782d154dbd4b40bfb763219259ec2 +TextureImporter: + internalIDToNameTable: + - first: + 213: -4805474362232562877 + second: frame_5_0 + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationMethod: 0 + spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: + - serializedVersion: 2 + name: frame_5_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1376 + height: 768 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 34b91ed27868f4db0800000000000000 + internalID: -4805474362232562877 + vertices: [] + indices: + edges: [] + weights: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Textures/Cutscene/frame_title.jpg b/Assets/Textures/Cutscene/frame_title.jpg new file mode 100644 index 0000000..5007608 --- /dev/null +++ b/Assets/Textures/Cutscene/frame_title.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ec550183076d8732ba54208ac7aee49b9238ee02efdc5d657c97ef29113a8b9 +size 572716 diff --git a/Assets/Textures/Cutscene/frame_title.jpg.meta b/Assets/Textures/Cutscene/frame_title.jpg.meta new file mode 100644 index 0000000..df1a2ec --- /dev/null +++ b/Assets/Textures/Cutscene/frame_title.jpg.meta @@ -0,0 +1,144 @@ +fileFormatVersion: 2 +guid: 1442240ca115f1647b1b19036fe08832 +TextureImporter: + internalIDToNameTable: + - first: + 213: -408133893875857581 + second: frame_title_0 + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationMethod: 0 + spriteTessellationDetail: -1 + spriteGeometrySubdivision: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: + - serializedVersion: 2 + name: frame_title_0 + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1376 + height: 768 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + customData: + outline: [] + physicsShape: [] + tessellationDetail: -1 + bones: [] + spriteID: 3578bbac264065af0800000000000000 + internalID: -408133893875857581 + vertices: [] + indices: + edges: [] + weights: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/room/Cosmic_Retro_Laboratory_2_Demo/Materials/Cosmic_Retro.mat b/Assets/room/Cosmic_Retro_Laboratory_2_Demo/Materials/Cosmic_Retro.mat index 870e918..617df22 100644 --- a/Assets/room/Cosmic_Retro_Laboratory_2_Demo/Materials/Cosmic_Retro.mat +++ b/Assets/room/Cosmic_Retro_Laboratory_2_Demo/Materials/Cosmic_Retro.mat @@ -100,12 +100,12 @@ Material: - _DetailNormalMapScale: 1 - _DstBlend: 0 - _DstBlendAlpha: 0 - - _EchoOpacity1: 0 - - _EchoOpacity2: 0 - - _EchoOpacity3: 0 - - _EchoRadius1: 0 - - _EchoRadius2: 0 - - _EchoRadius3: 0 + - _EchoOpacity1: 0.1 + - _EchoOpacity2: 0.1 + - _EchoOpacity3: 0.1 + - _EchoRadius1: 0.05 + - _EchoRadius2: 0.05 + - _EchoRadius3: 0.05 - _EnvironmentReflections: 1 - _FresnelPower: 2.5 - _FresnelStrength: 0.4 @@ -143,9 +143,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: 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} + - _EchoPosition1: {r: -12.45096, g: 0.36079788, b: -6.7416964, a: 1} + - _EchoPosition2: {r: -14.170757, g: 0.5187793, b: -6.8188305, a: 1} + - _EchoPosition3: {r: -12.694297, g: 0.5, b: -6.175, a: 1} - _EmissionColor: {r: 0.5849056, g: 0.5849056, b: 0.5849056, 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/room/Cosmic_Retro_Laboratory_2_Demo/Materials/Cosmic_Retro_Opacity.mat b/Assets/room/Cosmic_Retro_Laboratory_2_Demo/Materials/Cosmic_Retro_Opacity.mat index 3561861..694e2e1 100644 --- a/Assets/room/Cosmic_Retro_Laboratory_2_Demo/Materials/Cosmic_Retro_Opacity.mat +++ b/Assets/room/Cosmic_Retro_Laboratory_2_Demo/Materials/Cosmic_Retro_Opacity.mat @@ -105,12 +105,12 @@ Material: - _DetailNormalMapScale: 1 - _DstBlend: 10 - _DstBlendAlpha: 10 - - _EchoOpacity1: 0 - - _EchoOpacity2: 0 - - _EchoOpacity3: 0 - - _EchoRadius1: 0 - - _EchoRadius2: 0 - - _EchoRadius3: 0 + - _EchoOpacity1: 0.1 + - _EchoOpacity2: 0.1 + - _EchoOpacity3: 0.1 + - _EchoRadius1: 0.05 + - _EchoRadius2: 0.05 + - _EchoRadius3: 0.05 - _EnvironmentReflections: 1 - _FresnelPower: 2.5 - _FresnelStrength: 0.5 @@ -158,9 +158,9 @@ Material: - _Color: {r: 1, g: 1, b: 1, a: 0.2901961} - _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: 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} + - _EchoPosition1: {r: -12.45096, g: 0.36079788, b: -6.7416964, a: 1} + - _EchoPosition2: {r: -14.170757, g: 0.5187793, b: -6.8188305, a: 1} + - _EchoPosition3: {r: -12.694297, g: 0.5, b: -6.175, a: 1} - _EmissionColor: {r: 0.3018868, g: 0.3018868, b: 0.3018868, a: 1} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - _UvOffset: {r: 0, g: 0, b: 0, a: 0}