Исправил баг, когда панель с турелями появлялась раньше времени

This commit is contained in:
2026-05-29 01:07:53 +03:00
parent 2057a9f9fd
commit 9405cb7328
2 changed files with 13 additions and 1 deletions
+5 -1
View File
@@ -4942,6 +4942,7 @@ MonoBehaviour:
_sandPathBuildService: {fileID: 305503} _sandPathBuildService: {fileID: 305503}
_spawnDeathControl: {fileID: 694046010} _spawnDeathControl: {fileID: 694046010}
_tower: {fileID: 1739395621} _tower: {fileID: 1739395621}
_blockDetector: {fileID: 709556715}
--- !u!1 &645921916 --- !u!1 &645921916
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -13694,6 +13695,10 @@ MonoBehaviour:
_shop: {fileID: 1311268619} _shop: {fileID: 1311268619}
_wallet: {fileID: 1030979928} _wallet: {fileID: 1030979928}
_buttonPrefab: {fileID: 3635012363401127766, guid: f87d5d34136775b41907fc1187ef4bc2, type: 3} _buttonPrefab: {fileID: 3635012363401127766, guid: f87d5d34136775b41907fc1187ef4bc2, type: 3}
_ignoreBlocks:
- {fileID: 1987853413}
- {fileID: 1569763699}
- {fileID: 1331592355}
--- !u!95 &1789632543 --- !u!95 &1789632543
Animator: Animator:
serializedVersion: 7 serializedVersion: 7
@@ -14015,7 +14020,6 @@ MonoBehaviour:
_levels: _levels:
- {fileID: 11400000, guid: db2c2aace91545d4d9deea106eef0f8b, type: 2} - {fileID: 11400000, guid: db2c2aace91545d4d9deea106eef0f8b, type: 2}
- {fileID: 11400000, guid: 16db44f3b18ae8344877ec2245286b7d, type: 2} - {fileID: 11400000, guid: 16db44f3b18ae8344877ec2245286b7d, type: 2}
_pathBuildService: {fileID: 305503}
_onStateChanged: _onStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
+8
View File
@@ -8,6 +8,7 @@ public class TurretsShopViewer : MonoBehaviour
[SerializeField] private TurretsShop _shop; [SerializeField] private TurretsShop _shop;
[SerializeField] private Wallet _wallet; [SerializeField] private Wallet _wallet;
[SerializeField] private Button _buttonPrefab; [SerializeField] private Button _buttonPrefab;
[SerializeField] private List<BlockScript> _ignoreBlocks;
private Animator _animator; private Animator _animator;
private bool _hidden = true; private bool _hidden = true;
@@ -54,6 +55,13 @@ public class TurretsShopViewer : MonoBehaviour
private void OnBlockSelected(BlockScript block) private void OnBlockSelected(BlockScript block)
{ {
// Чтобы анимация не воспроизводилась когда не надо
if (_ignoreBlocks.Contains(block))
{
_ignoreBlocks.Clear();
return;
}
if (!_hidden) if (!_hidden)
return; return;