From d182c6a1d983da489c5b6f92ec724f96b953ea47 Mon Sep 17 00:00:00 2001 From: sega Date: Wed, 16 Sep 2026 16:38:49 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=BF=D1=80=D0=BE=D1=81=D1=82=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D1=83=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BF=D0=BE=D0=B4=D1=81=D0=B2=D0=B5=D1=82=D0=BA?= =?UTF-8?q?=D0=BE=D0=B9=20=D0=B8=20=D1=83=D0=B4=D0=B0=D0=BB=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20=D1=82=D0=B5=D1=81?= =?UTF-8?q?=D1=82=D0=BE=D0=B2=20=D0=BF=D1=80=D0=BE=D0=B8=D0=B7=D0=B2=D0=BE?= =?UTF-8?q?=D0=B4-=D1=81=D1=82=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Resources/PerformanceTestRunInfo.json | 1 - .../PerformanceTestRunInfo.json.meta | 7 - .../Resources/PerformanceTestRunSettings.json | 1 - .../PerformanceTestRunSettings.json.meta | 7 - Assets/Scripts/Common/GameManager.cs | 1 - Assets/Scripts/Common/LightSystem.cs | 158 +----------------- Assets/Scripts/UI/Menu/Menu.cs | 1 - 7 files changed, 3 insertions(+), 173 deletions(-) delete mode 100644 Assets/Resources/PerformanceTestRunInfo.json delete mode 100644 Assets/Resources/PerformanceTestRunInfo.json.meta delete mode 100644 Assets/Resources/PerformanceTestRunSettings.json delete mode 100644 Assets/Resources/PerformanceTestRunSettings.json.meta diff --git a/Assets/Resources/PerformanceTestRunInfo.json b/Assets/Resources/PerformanceTestRunInfo.json deleted file mode 100644 index b0add81..0000000 --- a/Assets/Resources/PerformanceTestRunInfo.json +++ /dev/null @@ -1 +0,0 @@ -{"TestSuite":"","Date":0,"Player":{"Development":false,"ScreenWidth":0,"ScreenHeight":0,"ScreenRefreshRate":0,"Fullscreen":false,"Vsync":0,"AntiAliasing":0,"Batchmode":false,"RenderThreadingMode":"MultiThreaded","MtRendering":false,"GraphicsJobs":false,"GpuSkinning":false,"Platform":"","ColorSpace":"","AnisotropicFiltering":"","BlendWeights":"","GraphicsApi":"","ScriptingBackend":"IL2CPP","AndroidTargetSdkVersion":"AndroidApiLevel36","AndroidBuildSystem":"Gradle","BuildTarget":"StandaloneWindows64","StereoRenderingPath":"MultiPass"},"Hardware":{"OperatingSystem":"","DeviceModel":"","DeviceName":"","ProcessorType":"","ProcessorCount":0,"GraphicsDeviceName":"","SystemMemorySizeMB":0},"Editor":{"Version":"6000.4.8f1","Branch":"6000.4/staging","Changeset":"f8b72d3d7343","Date":1778633116},"Dependencies":["com.coplaydev.unity-mcp@10.1.2","com.github-glitchenzo.nugetforunity@4.5.0","com.unity.2d.sprite@1.0.0","com.unity.addressables@2.9.1","com.unity.ide.visualstudio@2.0.27","com.unity.render-pipelines.universal@17.4.0","com.unity.ugui@2.0.0","com.unity.modules.accessibility@1.0.0","com.unity.modules.adaptiveperformance@1.0.0","com.unity.modules.ai@1.0.0","com.unity.modules.androidjni@1.0.0","com.unity.modules.animation@1.0.0","com.unity.modules.assetbundle@1.0.0","com.unity.modules.audio@1.0.0","com.unity.modules.cloth@1.0.0","com.unity.modules.director@1.0.0","com.unity.modules.imageconversion@1.0.0","com.unity.modules.imgui@1.0.0","com.unity.modules.jsonserialize@1.0.0","com.unity.modules.particlesystem@1.0.0","com.unity.modules.physics@1.0.0","com.unity.modules.physics2d@1.0.0","com.unity.modules.screencapture@1.0.0","com.unity.modules.terrain@1.0.0","com.unity.modules.terrainphysics@1.0.0","com.unity.modules.tilemap@1.0.0","com.unity.modules.ui@1.0.0","com.unity.modules.uielements@1.0.0","com.unity.modules.umbra@1.0.0","com.unity.modules.unityanalytics@1.0.0","com.unity.modules.unitywebrequest@1.0.0","com.unity.modules.unitywebrequestassetbundle@1.0.0","com.unity.modules.unitywebrequestaudio@1.0.0","com.unity.modules.unitywebrequesttexture@1.0.0","com.unity.modules.unitywebrequestwww@1.0.0","com.unity.modules.vectorgraphics@1.0.0","com.unity.modules.vehicles@1.0.0","com.unity.modules.video@1.0.0","com.unity.modules.vr@1.0.0","com.unity.modules.wind@1.0.0","com.unity.modules.xr@1.0.0","com.unity.modules.subsystems@1.0.0","com.unity.modules.hierarchycore@1.0.0","com.unity.render-pipelines.core@17.4.0","com.unity.shadergraph@17.4.0","com.unity.render-pipelines.universal-config@17.4.0","com.unity.test-framework@1.6.0","com.unity.profiling.core@1.0.3","com.unity.scriptablebuildpipeline@2.6.1","com.unity.nuget.newtonsoft-json@3.2.2","com.unity.searcher@4.9.4","com.unity.burst@1.8.29","com.unity.mathematics@1.3.3","com.unity.collections@6.4.0","com.unity.ext.nunit@2.0.5","com.unity.nuget.mono-cecil@1.11.6","com.unity.test-framework.performance@3.4.0"],"Results":[]} \ No newline at end of file diff --git a/Assets/Resources/PerformanceTestRunInfo.json.meta b/Assets/Resources/PerformanceTestRunInfo.json.meta deleted file mode 100644 index 3ec56fd..0000000 --- a/Assets/Resources/PerformanceTestRunInfo.json.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: a94a4c688a87bb44dbacba4baeda4c91 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Resources/PerformanceTestRunSettings.json b/Assets/Resources/PerformanceTestRunSettings.json deleted file mode 100644 index 49438ae..0000000 --- a/Assets/Resources/PerformanceTestRunSettings.json +++ /dev/null @@ -1 +0,0 @@ -{"MeasurementCount":-1} \ No newline at end of file diff --git a/Assets/Resources/PerformanceTestRunSettings.json.meta b/Assets/Resources/PerformanceTestRunSettings.json.meta deleted file mode 100644 index b6baa0a..0000000 --- a/Assets/Resources/PerformanceTestRunSettings.json.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 77be37e1925f83641a6e921e70789506 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Common/GameManager.cs b/Assets/Scripts/Common/GameManager.cs index 81a4598..407a246 100644 --- a/Assets/Scripts/Common/GameManager.cs +++ b/Assets/Scripts/Common/GameManager.cs @@ -398,7 +398,6 @@ public class GameManager : MonoBehaviour if (gameMode == GameMode.pvp)//переключаем таймеры только в pvp { timerManager.SetActiveTimer(currentPlayer); - LightSystem.Player(currentPlayer); } } diff --git a/Assets/Scripts/Common/LightSystem.cs b/Assets/Scripts/Common/LightSystem.cs index 797d5ac..5430a85 100644 --- a/Assets/Scripts/Common/LightSystem.cs +++ b/Assets/Scripts/Common/LightSystem.cs @@ -1,10 +1,7 @@ -using CharacterSystem; -using UnityEngine; +using UnityEngine; -//Зависит от ComWrapper public static class LightSystem { - private const string LIGHT_COMMAND_PREFIX = "80"; private const string ButtonLightingOnCommand = "2171"; private const string ButtonLightingOffCommand = "2170"; private const string SpecialEffectCommandPrefix = "8560"; @@ -35,155 +32,6 @@ public static class LightSystem return; } - ComWrapper.Send($"{SpecialEffectCommandPrefix}{effectNumber:D2}{durationSeconds}"); + ComWrapper.Send($"{SpecialEffectCommandPrefix}{effectNumber:D2}{durationSeconds:D2}"); } - - public static void Idle() - { - if (Random.Range(0, 2) == 0) - SendLightCommandToCom(LightMode.Idle1); - else - SendLightCommandToCom(LightMode.Idle2); - } - - public static void Win() - { - SendLightCommandToCom(LightMode.Win); - } - - public static void Lose() - { - SendLightCommandToCom(LightMode.Lose); - } - - public static void Player(Team currentPlayer) - { - if (currentPlayer == Team.Player1) - SendLightCommandToCom(LightMode.Orange); - else - SendLightCommandToCom(LightMode.Blue); - } - - public static void Prize() - { - SendLightCommandToCom(LightMode.Prize); - } - - public static void Character(Character currentCharacter) - { - LightMode lightMode; - - lightMode = currentCharacter.CharacterIndex switch - { - 0 => LightMode.Toaster, - 1 => LightMode.Tama, - 2 => LightMode.Dog, - 3 => LightMode.Sam, - 4 => LightMode.Mistress, - _ => LightMode.Idle2 - }; - - SendLightCommandToCom(lightMode); - } - - public static void Promo() - { - string[] signals = { "521", "523", "524" }; - - string signal = signals[Random.Range(0, signals.Length)]; - SendLightCommandToCom(signal); - } - - - private static void SendLightCommandToCom(LightMode lightMode) - { - try - { - string signal = GetLightString(lightMode); - ComWrapper.Send(signal); - } - catch { Debug.LogError("Ошибка отправки светового сигнала."); } - } - - /// - /// Принимает сингнал без префикса. В процессе сам его добавляет. - /// - private static void SendLightCommandToCom(string signal) - { - try - { - ComWrapper.Send(LIGHT_COMMAND_PREFIX + signal); - } - catch { Debug.LogError("Ошибка отправки светового сигнала."); } - } - - private static string GetLightString(LightMode lightMode) - { - string lightsingal; - - //определить версию - int version = ConfigManager.Config.LightVersion; - if (version == 1) - { - //1 версия - lightsingal = lightMode switch - { - LightMode.Idle1 => "500", - LightMode.Idle2 => "507", - LightMode.Orange => "501", - LightMode.Blue => "502", - LightMode.Win => "503", - LightMode.Lose => "504", - LightMode.Prize => "509", - - LightMode.Toaster => "500", - LightMode.Tama => "513", - LightMode.Dog => "514", - LightMode.Sam => "515", - LightMode.Mistress => "516", - - _ => "500" - }; - } - else - { - //2 версия (пока дефолт) - lightsingal = lightMode switch - { - LightMode.Idle1 => "500", - LightMode.Idle2 => "507", - LightMode.Orange => "501", - LightMode.Blue => "502", - LightMode.Win => "503", - LightMode.Lose => "504", - LightMode.Prize => "509", - - LightMode.Toaster => "513", - LightMode.Tama => "514", - LightMode.Dog => "515", - LightMode.Sam => "516", - LightMode.Mistress => "517", - - _ => "500" - }; - } - - return LIGHT_COMMAND_PREFIX + lightsingal; - } -} - -public enum LightMode -{ - Idle1, - Idle2, - Orange, - Blue, - Win, - Lose, - Prize, - Toaster, - Tama, - Dog, - Sam, - Mistress -} +} \ No newline at end of file diff --git a/Assets/Scripts/UI/Menu/Menu.cs b/Assets/Scripts/UI/Menu/Menu.cs index e31b3bb..d24d74a 100644 --- a/Assets/Scripts/UI/Menu/Menu.cs +++ b/Assets/Scripts/UI/Menu/Menu.cs @@ -71,7 +71,6 @@ public class Menu : MonoBehaviour, IControlable private void Enable() { ControlsEnabled = true; - LightSystem.Idle(); } private void Disable()