Панель выдать или выйти еще доработана. Переработан роутинг состояний для захода в панель. Добавлена зависимость от настройки

This commit is contained in:
se_ga 2026-04-02 16:57:26 +03:00
parent 99264587b4
commit 8bcee6ea2f
12 changed files with 4300 additions and 9450 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, g: 1, b: 0.10147333, a: 1}
- _GlowColor: {r: 0, g: 0.76047873, 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}

File diff suppressed because one or more lines are too long

View File

@ -6005,6 +6005,7 @@ MonoBehaviour:
vitrinaPanel: {fileID: 61619038}
qrPanel: {fileID: 1060301113}
vitrinaCatcher: {fileID: 1984502421}
takeOrRiskPanel: {fileID: 7847968414815734404}
--- !u!4 &259182280
Transform:
m_ObjectHideFlags: 0
@ -14059,6 +14060,8 @@ MonoBehaviour:
prefab: {fileID: 7872553190807181184, guid: f2cc4d65460a1864cac8d119b87a76a2, type: 3}
- id: Prizing
prefab: {fileID: 1804015508813908771, guid: cdc2db675d691d3438e213fc716e5ae6, type: 3}
- id: TakeOrRisk
prefab: {fileID: 1804015508813908771, guid: cdc2db675d691d3438e213fc716e5ae6, type: 3}
- id: EnableVoices
prefab: {fileID: 1804015508813908771, guid: cdc2db675d691d3438e213fc716e5ae6, type: 3}
- id: Difficulty
@ -14110,6 +14113,8 @@ MonoBehaviour:
descriptionPrefab: {fileID: 7265677761729542613, guid: f350d6a998ae46344bcd65a2bcb6eb3a, type: 3}
- id: Freeplay
descriptionPrefab: {fileID: 7265677761729542613, guid: f601ae0d27a2e534cb3b7e1811f2c954, type: 3}
- id: TakeOrRisk
descriptionPrefab: {fileID: 7265677761729542613, guid: 9d5393e2c374c6a49adf05d484f89bae, type: 3}
- id: MusicVolume
descriptionPrefab: {fileID: 7265677761729542613, guid: 7aa8f09ebc2045745b7cf6f501a0b998, type: 3}
- id: Prizing
@ -18231,6 +18236,141 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 770180115}
m_CullTransparentMesh: 1
--- !u!1 &776951564
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 776951565}
- component: {fileID: 776951567}
- component: {fileID: 776951566}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &776951565
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 776951564}
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: 8549428697360486891}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 711.4, y: 50}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &776951566
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 776951564}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
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: "\u0417\u0430\u0431\u0440\u0430\u0442\u044C \u044D\u0442\u043E\u0442 \u043F\u0440\u0438\u0437
\u0438 \u0432\u044B\u0439\u0442\u0438"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 3f10bbcf486189d4f95b8de6dc2e2177, type: 2}
m_sharedMaterial: {fileID: 4262305343556741190, guid: 3f10bbcf486189d4f95b8de6dc2e2177, 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: 32
m_fontSizeBase: 32
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 16
m_fontSizeMax: 64
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 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 &776951567
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 776951564}
m_CullTransparentMesh: 1
--- !u!1 &781296512
GameObject:
m_ObjectHideFlags: 0
@ -34176,6 +34316,10 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5458870206668225629, guid: f8172e74629723c4e993e8ac2f322bdf, type: 3}
propertyPath: m_CullTransparentMesh
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
@ -51378,6 +51522,141 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1614501702}
m_CullTransparentMesh: 1
--- !u!1 &1617932514
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1617932515}
- component: {fileID: 1617932517}
- component: {fileID: 1617932516}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1617932515
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1617932514}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.0002826, y: 1.0002826, z: 1.0002826}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2720328458227109517}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 711.4, y: 50}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &1617932516
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1617932514}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
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: "\u0411\u043E\u0440\u043E\u0442\u044C\u0441\u044F \u0437\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439
\u043F\u0440\u0438\u0437"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 3f10bbcf486189d4f95b8de6dc2e2177, type: 2}
m_sharedMaterial: {fileID: 4262305343556741190, guid: 3f10bbcf486189d4f95b8de6dc2e2177, 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: 32
m_fontSizeBase: 32
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 16
m_fontSizeMax: 64
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 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 &1617932517
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1617932514}
m_CullTransparentMesh: 1
--- !u!1 &1635073818
GameObject:
m_ObjectHideFlags: 0
@ -58397,22 +58676,6 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f8172e74629723c4e993e8ac2f322bdf, type: 3}
--- !u!224 &1985746126 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 4769901412115232176, guid: f8172e74629723c4e993e8ac2f322bdf, type: 3}
m_PrefabInstance: {fileID: 1985746125}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1985746127 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 1203032466002125781, guid: f8172e74629723c4e993e8ac2f322bdf, type: 3}
m_PrefabInstance: {fileID: 1985746125}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 006a8f6ee593bb94d96ebb190f38e418, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::PrizeView
--- !u!1 &1997844673
GameObject:
m_ObjectHideFlags: 0
@ -62733,24 +62996,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 486111181503463777}
m_CullTransparentMesh: 1
--- !u!1 &443431873136071132
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8146971645499113177}
- component: {fileID: 5091080390201011766}
- component: {fileID: 6751609796481713764}
m_Layer: 5
m_Name: description
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &486111181503463777
GameObject:
m_ObjectHideFlags: 0
@ -63070,6 +63315,17 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6268675161147607854}
m_CullTransparentMesh: 1
--- !u!114 &1203032464621942552 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 1203032466002125781, guid: f8172e74629723c4e993e8ac2f322bdf, type: 3}
m_PrefabInstance: {fileID: 1985746125}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 006a8f6ee593bb94d96ebb190f38e418, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::PrizeView
--- !u!224 &1207022060260024352
RectTransform:
m_ObjectHideFlags: 0
@ -63420,9 +63676,9 @@ RectTransform:
- {fileID: 3880825460768675321}
m_Father: {fileID: 8103669389208551850}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 1000, y: -50}
m_SizeDelta: {x: 400, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!4 &2152403073884678519
@ -68408,11 +68664,12 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1083634612}
- {fileID: 1617932515}
m_Father: {fileID: 7072048023201074136}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 325, y: -212.98}
m_SizeDelta: {x: 350, y: 350}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &2818249828079342868
@ -73937,6 +74194,11 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5475115496630895061}
m_CullTransparentMesh: 1
--- !u!224 &4769901410267373949 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 4769901412115232176, guid: f8172e74629723c4e993e8ac2f322bdf, type: 3}
m_PrefabInstance: {fileID: 1985746125}
m_PrefabAsset: {fileID: 0}
--- !u!222 &4842424254261898494
CanvasRenderer:
m_ObjectHideFlags: 0
@ -74072,14 +74334,6 @@ RectTransform:
m_AnchoredPosition: {x: 100, y: 0}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0, y: 0.5}
--- !u!222 &5091080390201011766
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 443431873136071132}
m_CullTransparentMesh: 1
--- !u!1 &5164932545780192586
GameObject:
m_ObjectHideFlags: 0
@ -74285,9 +74539,9 @@ RectTransform:
- {fileID: 5020842444716809631}
m_Father: {fileID: 8103669389208551850}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 200, y: -50}
m_SizeDelta: {x: 400, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &5475115496630895061
@ -74748,100 +75002,6 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &6751609796481713764
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 443431873136071132}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
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: "\u0415\u0441\u043B\u0438 \u0437\u0430\u0431\u0440\u0430\u0442\u044C \u043F\u0440\u0438\u0437,
\u0442\u043E \u0438\u0433\u0440\u0430 \u0437\u0430\u043A\u043E\u043D\u0447\u0438\u0442\u0441\u044F\n\n\u0415\u0441\u043B\u0438
\u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u0435\u0441\u0442\u044C
\u0448\u0430\u043D\u0441 \u043F\u043E\u0431\u043E\u0440\u043E\u0442\u044C\u0441\u044F
\u0437\u0430 \u0431\u043E\u043B\u0435\u0435 \u043A\u0440\u0443\u0442\u044B\u0435
\u043F\u0440\u0438\u0437\u044B"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 3f10bbcf486189d4f95b8de6dc2e2177, type: 2}
m_sharedMaterial: {fileID: 4262305343556741190, guid: 3f10bbcf486189d4f95b8de6dc2e2177, 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: 26
m_fontSizeBase: 26
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 16
m_fontSizeMax: 64
m_fontStyle: 0
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 0
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 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 &6781911929991493967
CanvasRenderer:
m_ObjectHideFlags: 0
@ -74919,13 +75079,13 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 8549428697360486891}
- {fileID: 2720328458227109517}
- {fileID: 8549428697360486891}
m_Father: {fileID: 8917489125503085284}
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, y: -48.02}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 1300, y: 425.96}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7126503618030721553
@ -75191,7 +75351,7 @@ MonoBehaviour:
m_EditorClassIdentifier: Assembly-CSharp::TakeOrRiskPanel
CurrentPrizeFrame: {fileID: 2944032316663602777}
NextPrizeFrame: {fileID: 1501477561599320377}
CurrentPrizeView: {fileID: 1985746127}
CurrentPrizeView: {fileID: 1203032464621942552}
NextPrizeView: {fileID: 1083634613}
DisabledColor: {r: 0.16981131, g: 0.16981131, b: 0.16981131, a: 1}
HsvSpeed: 0.3
@ -75224,6 +75384,7 @@ MonoBehaviour:
ScalingSpeed: 1
SelectedScale: 1.05
IdleScale: 0.95
StartAcceptingClip: {fileID: 8300000, guid: 7fb340d179cafc04cb2e4baa2ddde96f, type: 3}
--- !u!114 &7987471542231822866
MonoBehaviour:
m_ObjectHideFlags: 0
@ -75529,25 +75690,6 @@ MonoBehaviour:
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!224 &8146971645499113177
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 443431873136071132}
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: 8917489125503085284}
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, y: 190.2}
m_SizeDelta: {x: 1079.7, y: 165.36}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &8189718334980101899
RectTransform:
m_ObjectHideFlags: 0
@ -75583,9 +75725,9 @@ RectTransform:
- {fileID: 1708739322905412977}
m_Father: {fileID: 8103669389208551850}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 600, y: -50}
m_SizeDelta: {x: 400, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &8222282631303063231
@ -75694,12 +75836,13 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1985746126}
- {fileID: 4769901410267373949}
- {fileID: 776951565}
m_Father: {fileID: 7072048023201074136}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 975, y: -212.98}
m_SizeDelta: {x: 350, y: 350}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &8752651682790280933
@ -75720,7 +75863,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!1 &8872197949266842959
GameObject:
m_ObjectHideFlags: 0
@ -75752,7 +75895,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 524710472297192948}
- {fileID: 8146971645499113177}
- {fileID: 7072048023201074136}
- {fileID: 8103669389208551850}
m_Father: {fileID: 1122363135}

View File

@ -15,29 +15,41 @@ public class CharacterController : MonoBehaviour
[SerializeField] private Vector2 hiddenLocalPosition;
[SerializeField] private Vector2 shownLocalPosition;
private bool charactersActivated = false;
private int currentIndex = 0;
[SerializeField] private float speed;
public static CharacterController I;
#endregion
public static int CharactersAmount => I.characters.Length;
public static Sprite CurrentChipImage => CurrentCharacter.chipImage;
public static Character CurrentCharacter => I.characters[I.currentIndex];
public static Character NextCharacter
{
get
{
if (I.currentIndex + 1 < I.characters.Length)
{
return I.characters[I.currentIndex + 1];
}
else return null;
}
}
//================================= start: PUBLIC API =================================//
public void SetAllCharactersPrizeAvailable(bool value)
{
foreach(Character character in I.characters)
foreach (Character character in I.characters)
{
character.HasPrize = value;
}
@ -90,7 +102,7 @@ public class CharacterController : MonoBehaviour
//обрабатвыаем некорректные вводные
if (GameManager.instance.botsAmount <= 0)
throw new System.Exception("Некорректное количество ботов в менеджере");
if(characterPrefabs.Count <= 0)
if (characterPrefabs.Count <= 0)
throw new System.Exception("Не заданы боты в контроллере");
@ -118,7 +130,7 @@ public class CharacterController : MonoBehaviour
{
List<Prize> prizes = PrizeSerializer.LoadPrizes();
for (int i = 0;i < characters.Length; i++)
for (int i = 0; i < characters.Length; i++)
{
characters[i].prize = prizes[i];
}

View File

@ -119,6 +119,9 @@ public class GameManager : MonoBehaviour
private Logger logger;
public VitrinaCatcher vitrinaCatcher;
public TakeOrRiskPanel takeOrRiskPanel;
void Awake()
{
Cursor.lockState = CursorLockMode.Locked;

View File

@ -17,7 +17,7 @@ public static class StateRouter
TurnEndingResult.PlayerWinPve => PlayerWinPveHandler(),
TurnEndingResult.PlayerWinPvp => PlayerWinPvpHandler(gm.currentPlayer),
TurnEndingResult.Draw => DrawHandler(),
_ => Fallback()
_ => ToMenu()
};
gm.stateMachine.ChangeState(nextState);
@ -45,12 +45,46 @@ public static class StateRouter
private static IState PlayerWinPveHandler() //тут нужна обертка в приз + обертка в приз/супер приз
{
if (CharacterController.CurrentCharacter.HasPrize)
bool prizing = SettingsManager.GetBool("Prizing", false);
if (!prizing) return NextBot();
bool takeOrRisk = SettingsManager.GetBool("TakeOrRisk", false);
if (!takeOrRisk)
{
PrizeSystemManager.GivePrize(CharacterController.CurrentCharacter.prize);
CharacterController.CurrentCharacter.HasPrize = false;
TryGivePrize();
return NextBot();
}
var currentPrize = CharacterController.CurrentCharacter.prize;
bool currentBotHasNonEmptyPrize = CharacterController.CurrentCharacter.HasPrize && currentPrize is not EmptyPrize;
if (!currentBotHasNonEmptyPrize) return NextBot();
var nextPrize = PrizeSystemManager.GetFirstNonEmptyPrizeAfter(currentPrize);
if (nextPrize != null)
{
gm.takeOrRiskPanel.SetPrizes(currentPrize, nextPrize);
return new TakeOrRiskState(NextBot(), gm.takeOrRiskPanel);
}
else
{
return NextBot();
}
void TryGivePrize()
{
if (CharacterController.CurrentCharacter.HasPrize)
{
PrizeSystemManager.GivePrize(CharacterController.CurrentCharacter.prize);
CharacterController.CurrentCharacter.HasPrize = false;
}
}
}
public static IState NextBot()
{
DifficultyManager.Instance.IncreaseDifficulty();
gm.vsBotScore += 1;
CharacterEventBus.Instance.OnPlayerWin?.Invoke();
@ -69,12 +103,13 @@ public static class StateRouter
ClearAllScales();
return new VictoryState();
}
else
else
{
return new PrizeState(CreateAutoTransitionState(2f));
}
}
private static IState PlayerWinPvpHandler(CellState winner)
{
gm.IncreaseScoreAndScaleOfPlayer(winner);
@ -101,7 +136,7 @@ public static class StateRouter
return new ShowWinnerState();
}
private static IState Fallback()
public static IState ToMenu()
{
FieldCleaner.Clear();
return new MenuState();

View File

@ -0,0 +1,48 @@
using PrizeSystem;
public class TakeOrRiskState : IState
{
private IState nextState;
private TakeOrRiskPanel takeOrRiskPanel;
public TakeOrRiskState(IState nextState, TakeOrRiskPanel takeOrRiskPanel)
{
this.nextState = nextState;
this.takeOrRiskPanel = takeOrRiskPanel;
}
public void enter()
{
takeOrRiskPanel.gameObject.SetActive(true);
takeOrRiskPanel.OnComplete += TakeOrRiskPanel_OnComplete;
}
private void TakeOrRiskPanel_OnComplete(TakeOrRiskOption selectedOption)
{
if (selectedOption == TakeOrRiskOption.Take)
{
if (CharacterController.CurrentCharacter.HasPrize)
{
PrizeSystemManager.GivePrize(CharacterController.CurrentCharacter.prize);
CharacterController.CurrentCharacter.HasPrize = false;
}
GameManager.instance.stateMachine.ChangeState(new PrizeState(StateRouter.ToMenu()));
}
else
{
//Следующий бот
GameManager.instance.stateMachine.ChangeState(nextState);
}
}
public void exit()
{
takeOrRiskPanel.OnComplete -= TakeOrRiskPanel_OnComplete;
}
public void update()
{
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 968f890c735d5bf4b93d90ee008ec65f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -50,6 +50,24 @@ namespace PrizeSystem
//=========================== PUBLIC API ===========================//
public static Prize GetFirstNonEmptyPrizeAfter(Prize referencePrize)
{
if (referencePrize == null) return null;
int currentPrizeIndex = cachedPrizes.IndexOf(referencePrize);
if (currentPrizeIndex < 0) return null;
for (int i = currentPrizeIndex + 1; i < cachedPrizes.Count; i++)
{
var selectedPrize = cachedPrizes[i];
if (selectedPrize is not EmptyPrize)
{
return selectedPrize;
}
}
return null;
}
public void Initialize()
{
instance = this;

View File

@ -1,5 +1,139 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1638561412265185643
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2248773965054470075}
- component: {fileID: 5458870206668225629}
- component: {fileID: 7128173437019644448}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2248773965054470075
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1638561412265185643}
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: 4769901412115232176}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -100.149994}
m_SizeDelta: {x: -20, y: -220.29999}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5458870206668225629
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1638561412265185643}
m_CullTransparentMesh: 1
--- !u!114 &7128173437019644448
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1638561412265185643}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
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: New Text
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 3f10bbcf486189d4f95b8de6dc2e2177, type: 2}
m_sharedMaterial: {fileID: 4262305343556741190, guid: 3f10bbcf486189d4f95b8de6dc2e2177, 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: 26
m_fontSizeBase: 26
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 16
m_fontSizeMax: 64
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 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!1 &2875758851730211012
GameObject:
m_ObjectHideFlags: 0
@ -30,7 +164,7 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 6664003626657907884}
- {fileID: 7069304449374954144}
- {fileID: 2248773965054470075}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
@ -51,7 +185,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::PrizeView
_image: {fileID: 8597922984813688388}
_label: {fileID: 4166301179147098465}
_label: {fileID: 7128173437019644448}
map:
- prizeType: 0
sprite: {fileID: 21300000, guid: 6e622d073fff38b468edb48bec60df75, type: 3}
@ -143,140 +277,3 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &8097554898773150209
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7069304449374954144}
- component: {fileID: 5826936457847553742}
- component: {fileID: 4166301179147098465}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7069304449374954144
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8097554898773150209}
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: 4769901412115232176}
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, y: -58.1}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5826936457847553742
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8097554898773150209}
m_CullTransparentMesh: 1
--- !u!114 &4166301179147098465
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8097554898773150209}
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: New Text
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 3f10bbcf486189d4f95b8de6dc2e2177, type: 2}
m_sharedMaterial: {fileID: 4262305343556741190, guid: 3f10bbcf486189d4f95b8de6dc2e2177, 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: 32
m_fontSizeBase: 32
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 16
m_fontSizeMax: 64
m_fontStyle: 0
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
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}

View File

@ -26,6 +26,8 @@ namespace PrizeSystem
[SerializeField] private float SelectedScale = 1.05f;
[SerializeField] private float IdleScale = 0.95f;
[SerializeField] private AudioClip StartAcceptingClip;
private TakeOrRiskOption SelectedOption;
public event Action<TakeOrRiskOption> OnComplete;
@ -35,7 +37,7 @@ namespace PrizeSystem
private void OnEnable()
{
SelectedOption = TakeOrRiskOption.Take;
SelectedOption = TakeOrRiskOption.Risk;
activeFrame = CurrentPrizeFrame;
inactiveFrame = NextPrizeFrame;
@ -69,10 +71,18 @@ namespace PrizeSystem
private (TakeOrRiskOption selectedOption, float timerDelta) ProcessInput()
{
if (In.GetButtonAnyPlayer(PlayerAction.left))
SelectedOption = TakeOrRiskOption.Take;
if (In.GetButtonAnyPlayer(PlayerAction.right))
if (In.GetButtonAnyPlayer(PlayerAction.left) && SelectedOption != TakeOrRiskOption.Risk)
{
SoundManager.instance.playSwitch();
SelectedOption = TakeOrRiskOption.Risk;
}
if (In.GetButtonAnyPlayer(PlayerAction.right) && SelectedOption != TakeOrRiskOption.Take)
{
SoundManager.instance.playSwitch();
SelectedOption = TakeOrRiskOption.Take;
}
if(In.GetButtonDownAnyPlayer(PlayerAction.down)) SoundManager.instance.playClip(StartAcceptingClip);
float timerDelta = Time.deltaTime * (In.GetButtonAnyPlayer(PlayerAction.down) ? 1 : -1);
return (SelectedOption, timerDelta);
@ -90,8 +100,8 @@ namespace PrizeSystem
private void DisplayGraphics()
{
// Скалирование
activeFrame.transform.localScale = Vector2.MoveTowards(activeFrame.transform.localScale, Vector2.one * SelectedScale, Time.deltaTime * ScalingSpeed);
inactiveFrame.transform.localScale = Vector2.MoveTowards(inactiveFrame.transform.localScale, Vector2.one * IdleScale, Time.deltaTime * ScalingSpeed);
activeFrame.transform.localScale = Vector3.MoveTowards(activeFrame.transform.localScale, Vector3.one * SelectedScale, Time.deltaTime * ScalingSpeed);
inactiveFrame.transform.localScale = Vector3.MoveTowards(inactiveFrame.transform.localScale, Vector3.one * IdleScale, Time.deltaTime * ScalingSpeed);
//Цвет рамки
float hue = (Time.time * HsvSpeed) % 1f;

File diff suppressed because one or more lines are too long