Добавил отображение текущей волны

This commit is contained in:
2026-06-06 20:41:08 +03:00
parent ba3a6d9617
commit fdd9c953c6
3 changed files with 187 additions and 3 deletions
+155 -3
View File
@@ -2672,12 +2672,13 @@ RectTransform:
m_Children:
- {fileID: 44956005}
- {fileID: 2132434921}
- {fileID: 1034922718}
m_Father: {fileID: 1678567591}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 193.27669, y: -25.962708}
m_SizeDelta: {x: 376.4196, y: 40.2197}
m_AnchoredPosition: {x: 255.99217, y: -25.962708}
m_SizeDelta: {x: 501.8506, y: 40.2197}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &322473319
MonoBehaviour:
@@ -8088,6 +8089,157 @@ MonoBehaviour:
_onMoneyChanged:
m_PersistentCalls:
m_Calls: []
--- !u!1 &1034922717
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1034922718}
- component: {fileID: 1034922721}
- component: {fileID: 1034922720}
- component: {fileID: 1034922719}
m_Layer: 0
m_Name: WaveText
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1034922718
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1034922717}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 322473318}
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: 180.46123, y: 0.0000059096}
m_SizeDelta: {x: 123.7775, y: 31.476}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1034922719
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1034922717}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 693cd83c49e2a794182cce4d2c8bc411, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::WaveViewer
_gameManager: {fileID: 1875710079}
--- !u!114 &1034922720
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1034922717}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Build
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 41d169c64b9147349a84113d65d9e0cd, type: 2}
m_sharedMaterial: {fileID: 6511282304109922210, guid: 41d169c64b9147349a84113d65d9e0cd, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 20.35
m_fontSizeBase: 20.2
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 10
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_characterHorizontalScale: 1
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 0
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &1034922721
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1034922717}
m_CullTransparentMesh: 1
--- !u!1001 &1040472428
PrefabInstance:
m_ObjectHideFlags: 0
@@ -15990,7 +16142,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: -41.383713, y: -0.0000061989}
m_AnchoredPosition: {x: -170.9, y: 0.00028814}
m_SizeDelta: {x: 72.7351, y: 31.4766}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2132434922
+30
View File
@@ -0,0 +1,30 @@
using UnityEngine;
using TMPro;
[RequireComponent(typeof(TextMeshProUGUI))]
public class WaveViewer : MonoBehaviour
{
[SerializeField] private GameManager _gameManager;
private TextMeshProUGUI _text;
private void OnEnable()
{
_gameManager.OnLevelChanged += OnLevelChanged;
}
private void OnDisable()
{
_gameManager.OnLevelChanged -= OnLevelChanged;
}
private void Start()
{
_text = GetComponent<TextMeshProUGUI>();
}
private void OnLevelChanged(GameManager.OnLevelChangedEventArgs e)
{
_text.text = $"Wave {e.CurrentLevel} / {e.TotalLevels}";
}
}
+2
View File
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 693cd83c49e2a794182cce4d2c8bc411