diff --git a/Assets/Fonts/NEW/NexaRegular COOL.asset b/Assets/Fonts/NEW/NexaRegular COOL.asset index f091fa7..31608c4 100644 --- a/Assets/Fonts/NEW/NexaRegular COOL.asset +++ b/Assets/Fonts/NEW/NexaRegular COOL.asset @@ -11349,7 +11349,7 @@ Material: - _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767} - _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0} - _FaceColor: {r: 1, g: 1, b: 1, a: 1} - - _GlowColor: {r: 0, g: 0.5683422, b: 1, a: 1} + - _GlowColor: {r: 0.63892746, g: 0, b: 1, a: 1} - _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767} - _OutlineColor: {r: 0.554717, g: 0.554717, b: 0.554717, a: 1} - _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Scenes/GameScene3D.unity b/Assets/Scenes/GameScene3D.unity index a17013d..b30b3d4 100644 --- a/Assets/Scenes/GameScene3D.unity +++ b/Assets/Scenes/GameScene3D.unity @@ -6207,6 +6207,8 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: prizeErrorSound: {fileID: 8300000, guid: 5fb832a50dc689845898a59217fd0535, type: 3} + SoundNotification: 1 + PrizeNotificationSounds: [] --- !u!114 &259182291 MonoBehaviour: m_ObjectHideFlags: 0 @@ -25527,9 +25529,7 @@ MonoBehaviour: m_Calls: [] m_text: "\u0410\u043D\u0434\u0440\u0435\u0439 \u0411\u0435\u043B\u044F\u0435\u0432 - \u0410\u0432\u0442\u043E\u0440 \u0438\u0434\u0435\u0438, \u043F\u0440\u043E\u0434\u044E\u0441\u0441\u0435\u0440 - \u043C\u0438\u043B\u043B\u0438\u043E\u043D\u0435\u0440 \u0444\u0438\u043B\u0430\u043D\u0442\u0440\u043E\u043F\r\n\u0421\u0435\u0440\u0433\u0435\u0439 - \u0411\u043E\u043D\u0434\u0430\u0440\u044C - \u0420\u0430\u0437\u0440\u0430\u0431\u043E\u0442\u043A\u0430 - \u043D\u0430 Unity, \u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435\r\n\u0410\u043B\u0435\u043A\u0441\u0435\u0439 + \u043C\u0438\u043B\u043B\u0438\u043E\u043D\u0435\u0440 \u0444\u0438\u043B\u0430\u043D\u0442\u0440\u043E\u043F\r\r\n\u0410\u043B\u0435\u043A\u0441\u0435\u0439 \u041F\u043E\u043D\u0430\u043C\u0430\u0440\u0435\u0432 - \u0413\u0435\u0439\u043C\u0434\u0438\u0437\u0430\u0439\u043D, \u043A\u043E\u043E\u0440\u0434\u0438\u043D\u0430\u0446\u0438\u044F \u0440\u0430\u0437\u0440\u0430\u0431\u043E\u0442\u043A\u0438, \u043A\u043E\u043D\u0446\u0435\u043F\u0442 \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u0436\u0435\u0439, @@ -54972,8 +54972,8 @@ MonoBehaviour: m_fontMaterials: [] m_fontColor32: serializedVersion: 2 - rgba: 4278255408 - m_fontColor: {r: 0.1898483, g: 1, b: 0, a: 1} + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} m_enableVertexGradient: 0 m_colorMode: 3 m_fontColorGradient: @@ -54998,7 +54998,7 @@ MonoBehaviour: m_fontSizeMax: 72 m_fontStyle: 1 m_HorizontalAlignment: 2 - m_VerticalAlignment: 512 + m_VerticalAlignment: 256 m_textAlignment: 65535 m_characterSpacing: 0 m_wordSpacing: 0 diff --git a/Assets/Scripts/CoinCounter.cs b/Assets/Scripts/CoinCounter.cs index 3297854..f4aaff3 100644 --- a/Assets/Scripts/CoinCounter.cs +++ b/Assets/Scripts/CoinCounter.cs @@ -37,9 +37,18 @@ public class CoinCounter : MonoBehaviour public void SetRevengePriceVisibility(bool visibility) { revengeSignGo.SetActive(visibility); - int price = PlayerPrefs.GetInt("PriceRevenge", 10); + int priceRevenge = PlayerPrefs.GetInt("PriceRevenge", 10); + int pricePve = PlayerPrefs.GetInt("PricePVE", 10); string valutaName = PlayerPrefs.GetString("ValutaName", "руб."); - revengeSign.text = $"Повторная игра:
{price} {valutaName}"; + + if(priceRevenge < pricePve) + { + revengeSign.text = $"Цена игры:
{pricePve} {valutaName}
Повторная игра:
{priceRevenge} {valutaName}"; + } + else + { + revengeSign.text = $"Повторная игра:
{priceRevenge} {valutaName}"; + } } } diff --git a/Assets/Scripts/PrizeSystem/PrizeSystem.cs b/Assets/Scripts/PrizeSystem/PrizeSystem.cs index 15a6e8b..19c7663 100644 --- a/Assets/Scripts/PrizeSystem/PrizeSystem.cs +++ b/Assets/Scripts/PrizeSystem/PrizeSystem.cs @@ -1,4 +1,5 @@ using System.Collections; +using System.Collections.Generic; using System.IO; using System.Text; using UnityEngine; @@ -11,6 +12,9 @@ public class PrizeSystem : MonoBehaviour { [SerializeField] AudioClip prizeErrorSound; + [SerializeField] bool SoundNotification = true; + [SerializeField] List PrizeNotificationSounds; + public static string key_starts = "STARTS"; public static string key_startsNul = "STARTSNUL"; public static string key_prizesgiven = "PRIZESGIVEN"; @@ -66,15 +70,15 @@ public class PrizeSystem : MonoBehaviour { Debug.Log($"Выдача приза {Type}. Количество: {amount}"); prizing = true; + bool atLeastOnePrize = false; for (int i = 0; i < amount; i++) { bool noPrizWhenError = SettingsManager.GetBool("PrizingWhenError", true); bool errorRegistred = PlayerPrefs.GetInt(KeyVault.PRIZING_ERROR_REGISTRED, 0) == 1; - if (errorRegistred && noPrizWhenError) yield break; - float timeout = 10; //сек + float timeout = 10; Debug.Log("Начинаю выдачу 303"); ComWrapper.Send("303");//включаем мотор float startTime = Time.time; @@ -110,6 +114,9 @@ public class PrizeSystem : MonoBehaviour //Счетчики IncreasePrizeCounters(Type); + //хотя бы что то успешно выпало + atLeastOnePrize = true; + } else { @@ -117,6 +124,9 @@ public class PrizeSystem : MonoBehaviour SoundManager.instance.playClip(prizeErrorSound); } } + if (atLeastOnePrize) SoundNotificationIfNeeds(); + + } @@ -177,5 +187,15 @@ public class PrizeSystem : MonoBehaviour if (!PlayerPrefs.HasKey(key_starts)) PlayerPrefs.SetInt(key_starts, 0); if (!PlayerPrefs.HasKey(key_startsNul)) PlayerPrefs.SetInt(key_startsNul, 0); } + + private void SoundNotificationIfNeeds() + { + if(!SoundNotification) return; + if (PrizeNotificationSounds == null || PrizeNotificationSounds.Count == 0) return; + + int random = Random.Range(0, PrizeNotificationSounds.Count); + AudioClip notification = PrizeNotificationSounds[random]; + SoundManager.instance.playClip(notification); + } #endregion } diff --git a/Assets/Sounds/Выдача1.mp3 b/Assets/Sounds/Выдача1.mp3 new file mode 100644 index 0000000..ef87bfe Binary files /dev/null and b/Assets/Sounds/Выдача1.mp3 differ diff --git a/Assets/Sounds/Выдача1.mp3.meta b/Assets/Sounds/Выдача1.mp3.meta new file mode 100644 index 0000000..db89aa2 --- /dev/null +++ b/Assets/Sounds/Выдача1.mp3.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 1347f6385fc35fe4882304613a9fbfe9 +AudioImporter: + externalObjects: {} + serializedVersion: 7 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sounds/Выдача2.mp3 b/Assets/Sounds/Выдача2.mp3 new file mode 100644 index 0000000..7a4b644 Binary files /dev/null and b/Assets/Sounds/Выдача2.mp3 differ diff --git a/Assets/Sounds/Выдача2.mp3.meta b/Assets/Sounds/Выдача2.mp3.meta new file mode 100644 index 0000000..7388e99 --- /dev/null +++ b/Assets/Sounds/Выдача2.mp3.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 2e6426be1392aea48936249e22b54e1f +AudioImporter: + externalObjects: {} + serializedVersion: 7 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sounds/Выдача3.mp3 b/Assets/Sounds/Выдача3.mp3 new file mode 100644 index 0000000..51b7adf Binary files /dev/null and b/Assets/Sounds/Выдача3.mp3 differ diff --git a/Assets/Sounds/Выдача3.mp3.meta b/Assets/Sounds/Выдача3.mp3.meta new file mode 100644 index 0000000..a1324f2 --- /dev/null +++ b/Assets/Sounds/Выдача3.mp3.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: d38913d907d5e4244b25d6170a38686f +AudioImporter: + externalObjects: {} + serializedVersion: 7 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: