Система отображения состояния витрины внедрена

This commit is contained in:
se_ga 2026-04-03 11:31:53 +03:00
parent e04716a257
commit 58c4a7167a
5 changed files with 31 additions and 213 deletions

View File

@ -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.4159286, g: 1, b: 0, a: 1}
- _GlowColor: {r: 1, g: 0, b: 0.22419071, 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}

View File

@ -57793,8 +57793,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0.06, y: 0.9}
m_SizeDelta: {x: 2, y: 0.8755}
m_AnchoredPosition: {x: 0, y: -0.656}
m_SizeDelta: {x: 2.77, y: 0.8755}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1899726268
MonoBehaviour:
@ -57816,7 +57816,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: "\u0414\u043E \u0432\u044B\u0445\u043E\u0434\u0430 \\n\u0432 \u043C\u0435\u043D\u044E"
m_text: "\u0414\u043E \u0432\u044B\u0445\u043E\u0434\u0430 \u0432 \u043C\u0435\u043D\u044E"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 3f10bbcf486189d4f95b8de6dc2e2177, type: 2}
m_sharedMaterial: {fileID: 4262305343556741190, guid: 3f10bbcf486189d4f95b8de6dc2e2177, type: 2}
@ -57850,7 +57850,7 @@ MonoBehaviour:
m_fontSizeMin: 0
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 1
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0

View File

@ -64,6 +64,7 @@ public static class StateRouter
if (nextPrize != null)
{
gm.takeOrRiskPanel.SetPrizes(currentPrize, nextPrize);
gm.timerManager.StopAllTimers();
return new TakeOrRiskState(NextBot(), gm.takeOrRiskPanel);
}
else

View File

@ -20,21 +20,29 @@ public class VitrinaView : MonoBehaviour
[SerializeField] private Color AvailableEmptyColor;
[SerializeField] private Color NotAvailableColor;
private void Awake()
private void Start()
{
instance = this;
CharacterEventBus.Instance.OnCharacterAppeared.AddListener(ActivateIfNeed);
Deactivate();
}
public void Activate(VitrinaPrize vitrinaPrize)
public void ActivateIfNeed()
{
gameObject.SetActive(true);
foreach (var cell in Cells)
bool hasPrize = CharacterController.CurrentCharacter.HasPrize;
if (hasPrize && CharacterController.CurrentCharacter.prize is VitrinaPrize vitrinaPrize)
{
cell.sprite = NotAvailableCell;
cell.GetComponentInChildren<TextMeshProUGUI>().color = NotAvailableColor;
gameObject.SetActive(true);
foreach (var cell in Cells)
{
cell.sprite = NotAvailableCell;
cell.GetComponentInChildren<TextMeshProUGUI>().color = NotAvailableColor;
}
SetPrizesAsync(vitrinaPrize);
return;
}
SetPrizesAsync(vitrinaPrize);
Deactivate();
}
public async void SetPrizesAsync(VitrinaPrize vitrinaPrize)

File diff suppressed because one or more lines are too long