Compare commits
10 Commits
7104089c00
...
191bb340f7
| Author | SHA1 | Date | |
|---|---|---|---|
| 191bb340f7 | |||
| f16709b00d | |||
| 0197fb4aa2 | |||
| 492c1ea9f9 | |||
| 5a58c9031a | |||
| 285c11597a | |||
| e487795e6f | |||
| 6c9cdaf67d | |||
| 79a928ae52 | |||
| a9767c5301 |
@@ -12,7 +12,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: b4e8d5c36f36bb443b640a85df3e7077, type: 3}
|
m_Script: {fileID: 11500000, guid: b4e8d5c36f36bb443b640a85df3e7077, type: 3}
|
||||||
m_Name: MinesweeperGameConfig
|
m_Name: MinesweeperGameConfig
|
||||||
m_EditorClassIdentifier: Assembly-CSharp::Minesweeper.Config.MinesweeperGameConfig
|
m_EditorClassIdentifier: Assembly-CSharp::Minesweeper.Config.MinesweeperGameConfig
|
||||||
<Width>k__BackingField: 9
|
<MinSizeX>k__BackingField: 3
|
||||||
<Height>k__BackingField: 9
|
<MaxSizeX>k__BackingField: 30
|
||||||
<MinesCount>k__BackingField: 1
|
<MinSizeY>k__BackingField: 3
|
||||||
<RestartKey>k__BackingField: 114
|
<MaxSizeY>k__BackingField: 30
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ RectTransform:
|
|||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 1, y: 1}
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: -15, y: -15}
|
m_SizeDelta: {x: -8, y: -8}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!1 &3798432596530835849
|
--- !u!1 &3798432596530835849
|
||||||
GameObject:
|
GameObject:
|
||||||
@@ -162,7 +162,7 @@ RectTransform:
|
|||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 1, y: 1}
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 30, y: 30}
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &4574882275002937660
|
--- !u!222 &4574882275002937660
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
@@ -219,12 +219,12 @@ MonoBehaviour:
|
|||||||
m_faceColor:
|
m_faceColor:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
rgba: 4294967295
|
rgba: 4294967295
|
||||||
m_fontSize: 54.6
|
m_fontSize: 35.8
|
||||||
m_fontSizeBase: 15
|
m_fontSizeBase: 15
|
||||||
m_fontWeight: 400
|
m_fontWeight: 400
|
||||||
m_enableAutoSizing: 1
|
m_enableAutoSizing: 1
|
||||||
m_fontSizeMin: 18
|
m_fontSizeMin: 1
|
||||||
m_fontSizeMax: 72
|
m_fontSizeMax: 300
|
||||||
m_fontStyle: 0
|
m_fontStyle: 0
|
||||||
m_HorizontalAlignment: 2
|
m_HorizontalAlignment: 2
|
||||||
m_VerticalAlignment: 512
|
m_VerticalAlignment: 512
|
||||||
@@ -258,7 +258,7 @@ MonoBehaviour:
|
|||||||
m_VertexBufferAutoSizeReduction: 0
|
m_VertexBufferAutoSizeReduction: 0
|
||||||
m_useMaxVisibleDescender: 1
|
m_useMaxVisibleDescender: 1
|
||||||
m_pageToDisplay: 1
|
m_pageToDisplay: 1
|
||||||
m_margin: {x: 2, y: 2, z: 2, w: 2}
|
m_margin: {x: 1, y: 1, z: 1, w: 1}
|
||||||
m_isUsingLegacyAnimationComponent: 0
|
m_isUsingLegacyAnimationComponent: 0
|
||||||
m_isVolumetricText: 0
|
m_isVolumetricText: 0
|
||||||
m_hasFontAssetChanged: 0
|
m_hasFontAssetChanged: 0
|
||||||
@@ -276,6 +276,7 @@ GameObject:
|
|||||||
- component: {fileID: 7313243575525116621}
|
- component: {fileID: 7313243575525116621}
|
||||||
- component: {fileID: 8390786300108739894}
|
- component: {fileID: 8390786300108739894}
|
||||||
- component: {fileID: 1091584581727823407}
|
- component: {fileID: 1091584581727823407}
|
||||||
|
- component: {fileID: 6241952381746257391}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: ButtonMine
|
m_Name: ButtonMine
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@@ -385,3 +386,20 @@ MonoBehaviour:
|
|||||||
m_OnClick:
|
m_OnClick:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls: []
|
||||||
|
--- !u!114 &6241952381746257391
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6406400753494049822}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 2904d462d22809c499afe1842f6e6239, type: 3}
|
||||||
|
m_Name: ""
|
||||||
|
m_EditorClassIdentifier: Assembly-CSharp::Minesweeper.Presentation.Views.CellView
|
||||||
|
button: {fileID: 1091584581727823407}
|
||||||
|
backgroundImage: {fileID: 8390786300108739894}
|
||||||
|
contentRoot: {fileID: 855905148978497855}
|
||||||
|
contentImage: {fileID: 2245737607582627579}
|
||||||
|
label: {fileID: 8958233407636047794}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ GameObject:
|
|||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 2854659401256325699}
|
- component: {fileID: 2854659401256325699}
|
||||||
- component: {fileID: 5452205749846460716}
|
- component: {fileID: 5452205749846460716}
|
||||||
|
- component: {fileID: -4096144217532421454}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: BoardGrid
|
m_Name: BoardGrid
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@@ -60,3 +61,19 @@ MonoBehaviour:
|
|||||||
m_Spacing: {x: 0, y: 0}
|
m_Spacing: {x: 0, y: 0}
|
||||||
m_Constraint: 0
|
m_Constraint: 0
|
||||||
m_ConstraintCount: 2
|
m_ConstraintCount: 2
|
||||||
|
--- !u!114 &-4096144217532421454
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 463985621338212375}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 8e5eb8dfe520e3b40af304e66728dcfb, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier: Assembly-CSharp::Minesweeper.Presentation.Views.BoardView
|
||||||
|
root: {fileID: 463985621338212375}
|
||||||
|
boardPanel: {fileID: 2854659401256325699}
|
||||||
|
gridLayoutGroup: {fileID: 5452205749846460716}
|
||||||
|
uiConfig: {fileID: 11400000, guid: c8b7785713c7c8b49b853f7e5028a4fa, type: 2}
|
||||||
|
|||||||
@@ -428,7 +428,7 @@ GameObject:
|
|||||||
- component: {fileID: 2154271443323945884}
|
- component: {fileID: 2154271443323945884}
|
||||||
- component: {fileID: 6204093840248163070}
|
- component: {fileID: 6204093840248163070}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: Text (Mine) (1)
|
m_Name: Text (Max)
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
@@ -722,10 +722,10 @@ RectTransform:
|
|||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 6299792064077961574}
|
m_Father: {fileID: 6299792064077961574}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 1}
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
m_AnchorMax: {x: 0.5, y: 1}
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 250, y: 48}
|
m_SizeDelta: {x: 0, y: 48}
|
||||||
m_Pivot: {x: 0.5, y: 0}
|
m_Pivot: {x: 0.5, y: 0}
|
||||||
--- !u!222 &7925194886356738603
|
--- !u!222 &7925194886356738603
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
@@ -996,10 +996,10 @@ RectTransform:
|
|||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 4947738170035721252}
|
m_Father: {fileID: 4947738170035721252}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 1}
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
m_AnchorMax: {x: 0.5, y: 1}
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 250, y: 48}
|
m_SizeDelta: {x: 0, y: 48}
|
||||||
m_Pivot: {x: 0.5, y: 0}
|
m_Pivot: {x: 0.5, y: 0}
|
||||||
--- !u!222 &4764443876518541376
|
--- !u!222 &4764443876518541376
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
@@ -1208,10 +1208,10 @@ RectTransform:
|
|||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 8549637007489853463}
|
m_Father: {fileID: 8549637007489853463}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 1}
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
m_AnchorMax: {x: 0.5, y: 1}
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 1}
|
||||||
m_SizeDelta: {x: 250, y: 48}
|
m_SizeDelta: {x: 0, y: 48}
|
||||||
m_Pivot: {x: 0.5, y: 0}
|
m_Pivot: {x: 0.5, y: 0}
|
||||||
--- !u!222 &929277193634291900
|
--- !u!222 &929277193634291900
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
@@ -1421,8 +1421,8 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 1, y: 1}
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
m_AnchoredPosition: {x: -391, y: -192}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: -20, y: 0}
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!1 &3877081085258266573
|
--- !u!1 &3877081085258266573
|
||||||
GameObject:
|
GameObject:
|
||||||
@@ -1609,7 +1609,7 @@ GameObject:
|
|||||||
- component: {fileID: 7567565223110830849}
|
- component: {fileID: 7567565223110830849}
|
||||||
- component: {fileID: 3264166992253475585}
|
- component: {fileID: 3264166992253475585}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: Text (Mine)
|
m_Name: Text (Min)
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
@@ -2028,8 +2028,8 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 1, y: 1}
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
m_AnchoredPosition: {x: -391, y: -192}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: -20, y: 0}
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!1 &6455657920195163342
|
--- !u!1 &6455657920195163342
|
||||||
GameObject:
|
GameObject:
|
||||||
@@ -2068,7 +2068,7 @@ RectTransform:
|
|||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 1, y: 1}
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
m_AnchoredPosition: {x: 0, y: -21}
|
m_AnchoredPosition: {x: 0, y: -21}
|
||||||
m_SizeDelta: {x: -120, y: -162}
|
m_SizeDelta: {x: -150, y: -162}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &6446935312079034905
|
--- !u!114 &6446935312079034905
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
@@ -2420,8 +2420,8 @@ MonoBehaviour:
|
|||||||
m_faceColor:
|
m_faceColor:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
rgba: 4294967295
|
rgba: 4294967295
|
||||||
m_fontSize: 57
|
m_fontSize: 54
|
||||||
m_fontSizeBase: 57
|
m_fontSizeBase: 54
|
||||||
m_fontWeight: 400
|
m_fontWeight: 400
|
||||||
m_enableAutoSizing: 0
|
m_enableAutoSizing: 0
|
||||||
m_fontSizeMin: 18
|
m_fontSizeMin: 18
|
||||||
@@ -2664,6 +2664,24 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier: Assembly-CSharp::Minesweeper.Presentation.Views.MainMenuView
|
m_EditorClassIdentifier: Assembly-CSharp::Minesweeper.Presentation.Views.MainMenuView
|
||||||
root: {fileID: 7682962739562644362}
|
root: {fileID: 7682962739562644362}
|
||||||
startButton: {fileID: 3904309382312306706}
|
startButton: {fileID: 3904309382312306706}
|
||||||
|
sizeXSlider:
|
||||||
|
slider: {fileID: 2334871180416613717}
|
||||||
|
minText: {fileID: 4504773017523582976}
|
||||||
|
maxText: {fileID: 6866883084726833735}
|
||||||
|
valueText: {fileID: 4474316482196456833}
|
||||||
|
valueLabel: 'Size X: '
|
||||||
|
sizeYSlider:
|
||||||
|
slider: {fileID: 4051923562216906313}
|
||||||
|
minText: {fileID: 1453579952739003993}
|
||||||
|
maxText: {fileID: 8013579874201281113}
|
||||||
|
valueText: {fileID: 8926983590126121119}
|
||||||
|
valueLabel: 'Size Y: '
|
||||||
|
minesSlider:
|
||||||
|
slider: {fileID: 6456819381917595383}
|
||||||
|
minText: {fileID: 3264166992253475585}
|
||||||
|
maxText: {fileID: 6204093840248163070}
|
||||||
|
valueText: {fileID: 7868341748139096968}
|
||||||
|
valueLabel: 'Mines count: '
|
||||||
--- !u!1 &7723311763242053893
|
--- !u!1 &7723311763242053893
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -2847,8 +2865,8 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 1, y: 1}
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
m_AnchoredPosition: {x: -391, y: -192}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: -20, y: 0}
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!1 &8648434963355287167
|
--- !u!1 &8648434963355287167
|
||||||
GameObject:
|
GameObject:
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ GameObject:
|
|||||||
- component: {fileID: 1323395922687814}
|
- component: {fileID: 1323395922687814}
|
||||||
- component: {fileID: 2396570544786180172}
|
- component: {fileID: 2396570544786180172}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Label
|
m_Name: Text (Continue)
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
@@ -59,7 +59,7 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
|
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
|
||||||
m_Material: {fileID: 0}
|
m_Material: {fileID: 0}
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_RaycastTarget: 1
|
m_RaycastTarget: 0
|
||||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
m_Maskable: 1
|
m_Maskable: 1
|
||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
@@ -67,8 +67,8 @@ MonoBehaviour:
|
|||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_text: Continue
|
m_text: Continue
|
||||||
m_isRightToLeft: 0
|
m_isRightToLeft: 0
|
||||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
m_fontAsset: {fileID: 11400000, guid: a9e574c3959daac439febd16011e9205, type: 2}
|
||||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
m_sharedMaterial: {fileID: -6188865965018868098, guid: a9e574c3959daac439febd16011e9205, type: 2}
|
||||||
m_fontSharedMaterials: []
|
m_fontSharedMaterials: []
|
||||||
m_fontMaterial: {fileID: 0}
|
m_fontMaterial: {fileID: 0}
|
||||||
m_fontMaterials: []
|
m_fontMaterials: []
|
||||||
@@ -92,10 +92,10 @@ MonoBehaviour:
|
|||||||
m_faceColor:
|
m_faceColor:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
rgba: 4294967295
|
rgba: 4294967295
|
||||||
m_fontSize: 42.95
|
m_fontSize: 30
|
||||||
m_fontSizeBase: 36
|
m_fontSizeBase: 30
|
||||||
m_fontWeight: 400
|
m_fontWeight: 400
|
||||||
m_enableAutoSizing: 1
|
m_enableAutoSizing: 0
|
||||||
m_fontSizeMin: 18
|
m_fontSizeMin: 18
|
||||||
m_fontSizeMax: 72
|
m_fontSizeMax: 72
|
||||||
m_fontStyle: 0
|
m_fontStyle: 0
|
||||||
@@ -131,12 +131,118 @@ MonoBehaviour:
|
|||||||
m_VertexBufferAutoSizeReduction: 0
|
m_VertexBufferAutoSizeReduction: 0
|
||||||
m_useMaxVisibleDescender: 1
|
m_useMaxVisibleDescender: 1
|
||||||
m_pageToDisplay: 1
|
m_pageToDisplay: 1
|
||||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
m_margin: {x: 10, y: 10, z: 10, w: 10}
|
||||||
m_isUsingLegacyAnimationComponent: 0
|
m_isUsingLegacyAnimationComponent: 0
|
||||||
m_isVolumetricText: 0
|
m_isVolumetricText: 0
|
||||||
m_hasFontAssetChanged: 0
|
m_hasFontAssetChanged: 0
|
||||||
m_baseMaterial: {fileID: 0}
|
m_baseMaterial: {fileID: 0}
|
||||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
--- !u!1 &1586981547480857339
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 6224274704053806388}
|
||||||
|
- component: {fileID: 4145956972674934222}
|
||||||
|
- component: {fileID: 6660518877729283613}
|
||||||
|
- component: {fileID: 8534273822372783954}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Image
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &6224274704053806388
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1586981547480857339}
|
||||||
|
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:
|
||||||
|
- {fileID: 5608047556670537065}
|
||||||
|
- {fileID: 5707606247840532089}
|
||||||
|
- {fileID: 9043826669907694646}
|
||||||
|
- {fileID: 8881365639295328946}
|
||||||
|
m_Father: {fileID: 8980764968637402581}
|
||||||
|
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: 0}
|
||||||
|
m_SizeDelta: {x: 483.0835, y: 328}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &4145956972674934222
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1586981547480857339}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &6660518877729283613
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1586981547480857339}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||||
|
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_Sprite: {fileID: 3130755090995886313, guid: 4c4c10e49c2777748899d811a0e67689, type: 3}
|
||||||
|
m_Type: 1
|
||||||
|
m_PreserveAspect: 0
|
||||||
|
m_FillCenter: 1
|
||||||
|
m_FillMethod: 4
|
||||||
|
m_FillAmount: 1
|
||||||
|
m_FillClockwise: 1
|
||||||
|
m_FillOrigin: 0
|
||||||
|
m_UseSpriteMesh: 0
|
||||||
|
m_PixelsPerUnitMultiplier: 1
|
||||||
|
--- !u!114 &8534273822372783954
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1586981547480857339}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.VerticalLayoutGroup
|
||||||
|
m_Padding:
|
||||||
|
m_Left: 15
|
||||||
|
m_Right: 15
|
||||||
|
m_Top: 15
|
||||||
|
m_Bottom: 15
|
||||||
|
m_ChildAlignment: 4
|
||||||
|
m_Spacing: 16
|
||||||
|
m_ChildForceExpandWidth: 0
|
||||||
|
m_ChildForceExpandHeight: 0
|
||||||
|
m_ChildControlWidth: 0
|
||||||
|
m_ChildControlHeight: 0
|
||||||
|
m_ChildScaleWidth: 0
|
||||||
|
m_ChildScaleHeight: 0
|
||||||
|
m_ReverseArrangement: 0
|
||||||
--- !u!1 &2637081591348788270
|
--- !u!1 &2637081591348788270
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -163,18 +269,18 @@ RectTransform:
|
|||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 2637081591348788270}
|
m_GameObject: {fileID: 2637081591348788270}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 1294402234449297828}
|
- {fileID: 1294402234449297828}
|
||||||
m_Father: {fileID: 8980764968637402581}
|
m_Father: {fileID: 6224274704053806388}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 0}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 180, y: 48}
|
m_SizeDelta: {x: 400, y: 50}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &3470312087431380435
|
--- !u!222 &3470312087431380435
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
@@ -204,8 +310,8 @@ MonoBehaviour:
|
|||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_Sprite: {fileID: 0}
|
m_Sprite: {fileID: -4571551822685222379, guid: 4c4c10e49c2777748899d811a0e67689, type: 3}
|
||||||
m_Type: 0
|
m_Type: 1
|
||||||
m_PreserveAspect: 0
|
m_PreserveAspect: 0
|
||||||
m_FillCenter: 1
|
m_FillCenter: 1
|
||||||
m_FillMethod: 4
|
m_FillMethod: 4
|
||||||
@@ -213,7 +319,7 @@ MonoBehaviour:
|
|||||||
m_FillClockwise: 1
|
m_FillClockwise: 1
|
||||||
m_FillOrigin: 0
|
m_FillOrigin: 0
|
||||||
m_UseSpriteMesh: 0
|
m_UseSpriteMesh: 0
|
||||||
m_PixelsPerUnitMultiplier: 1
|
m_PixelsPerUnitMultiplier: 1.94
|
||||||
--- !u!114 &6836717569141764482
|
--- !u!114 &6836717569141764482
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -284,18 +390,18 @@ RectTransform:
|
|||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 2638123625286085122}
|
m_GameObject: {fileID: 2638123625286085122}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 897987131459102557}
|
- {fileID: 897987131459102557}
|
||||||
m_Father: {fileID: 8980764968637402581}
|
m_Father: {fileID: 6224274704053806388}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 0}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 180, y: 48}
|
m_SizeDelta: {x: 400, y: 50}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &7002517246287558728
|
--- !u!222 &7002517246287558728
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
@@ -325,8 +431,8 @@ MonoBehaviour:
|
|||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_Sprite: {fileID: 0}
|
m_Sprite: {fileID: -4571551822685222379, guid: 4c4c10e49c2777748899d811a0e67689, type: 3}
|
||||||
m_Type: 0
|
m_Type: 1
|
||||||
m_PreserveAspect: 0
|
m_PreserveAspect: 0
|
||||||
m_FillCenter: 1
|
m_FillCenter: 1
|
||||||
m_FillMethod: 4
|
m_FillMethod: 4
|
||||||
@@ -334,7 +440,7 @@ MonoBehaviour:
|
|||||||
m_FillClockwise: 1
|
m_FillClockwise: 1
|
||||||
m_FillOrigin: 0
|
m_FillOrigin: 0
|
||||||
m_UseSpriteMesh: 0
|
m_UseSpriteMesh: 0
|
||||||
m_PixelsPerUnitMultiplier: 1
|
m_PixelsPerUnitMultiplier: 1.94
|
||||||
--- !u!114 &623936683249341502
|
--- !u!114 &623936683249341502
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -389,8 +495,7 @@ GameObject:
|
|||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 8980764968637402581}
|
- component: {fileID: 8980764968637402581}
|
||||||
- component: {fileID: 8794113368554700498}
|
- component: {fileID: 8794113368554700498}
|
||||||
- component: {fileID: 2001891034146769603}
|
- component: {fileID: 7010459690024596299}
|
||||||
- component: {fileID: 3188781103839045936}
|
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: PausePanel
|
m_Name: PausePanel
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@@ -410,10 +515,7 @@ RectTransform:
|
|||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 5608047556670537065}
|
- {fileID: 6224274704053806388}
|
||||||
- {fileID: 5707606247840532089}
|
|
||||||
- {fileID: 9043826669907694646}
|
|
||||||
- {fileID: 8881365639295328946}
|
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
@@ -429,7 +531,7 @@ CanvasRenderer:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 2814582388565546678}
|
m_GameObject: {fileID: 2814582388565546678}
|
||||||
m_CullTransparentMesh: 1
|
m_CullTransparentMesh: 1
|
||||||
--- !u!114 &2001891034146769603
|
--- !u!114 &7010459690024596299
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
@@ -438,53 +540,13 @@ MonoBehaviour:
|
|||||||
m_GameObject: {fileID: 2814582388565546678}
|
m_GameObject: {fileID: 2814582388565546678}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_EditorHideFlags: 0
|
m_EditorHideFlags: 0
|
||||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
m_Script: {fileID: 11500000, guid: 548c3a1ddca35cc4d823c260a88dcecf, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
m_EditorClassIdentifier: Assembly-CSharp::Minesweeper.Presentation.Views.PauseView
|
||||||
m_Material: {fileID: 0}
|
root: {fileID: 2814582388565546678}
|
||||||
m_Color: {r: 0.08, g: 0.08, b: 0.08, a: 0.72}
|
restartButton: {fileID: 6144314195671038853}
|
||||||
m_RaycastTarget: 1
|
resumeButton: {fileID: 623936683249341502}
|
||||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
mainMenuButton: {fileID: 6836717569141764482}
|
||||||
m_Maskable: 1
|
|
||||||
m_OnCullStateChanged:
|
|
||||||
m_PersistentCalls:
|
|
||||||
m_Calls: []
|
|
||||||
m_Sprite: {fileID: 0}
|
|
||||||
m_Type: 0
|
|
||||||
m_PreserveAspect: 0
|
|
||||||
m_FillCenter: 1
|
|
||||||
m_FillMethod: 4
|
|
||||||
m_FillAmount: 1
|
|
||||||
m_FillClockwise: 1
|
|
||||||
m_FillOrigin: 0
|
|
||||||
m_UseSpriteMesh: 0
|
|
||||||
m_PixelsPerUnitMultiplier: 1
|
|
||||||
--- !u!114 &3188781103839045936
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 2814582388565546678}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.VerticalLayoutGroup
|
|
||||||
m_Padding:
|
|
||||||
m_Left: 0
|
|
||||||
m_Right: 0
|
|
||||||
m_Top: 0
|
|
||||||
m_Bottom: 0
|
|
||||||
m_ChildAlignment: 4
|
|
||||||
m_Spacing: 16
|
|
||||||
m_ChildForceExpandWidth: 0
|
|
||||||
m_ChildForceExpandHeight: 0
|
|
||||||
m_ChildControlWidth: 0
|
|
||||||
m_ChildControlHeight: 0
|
|
||||||
m_ChildScaleWidth: 0
|
|
||||||
m_ChildScaleHeight: 0
|
|
||||||
m_ReverseArrangement: 0
|
|
||||||
--- !u!1 &4212380874842696201
|
--- !u!1 &4212380874842696201
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -497,7 +559,7 @@ GameObject:
|
|||||||
- component: {fileID: 6029337994669973288}
|
- component: {fileID: 6029337994669973288}
|
||||||
- component: {fileID: 5250592819783767390}
|
- component: {fileID: 5250592819783767390}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: PauseTitle
|
m_Name: Text (Pause)
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
@@ -510,12 +572,12 @@ RectTransform:
|
|||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 4212380874842696201}
|
m_GameObject: {fileID: 4212380874842696201}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 8980764968637402581}
|
m_Father: {fileID: 6224274704053806388}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 0}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
@@ -552,15 +614,15 @@ MonoBehaviour:
|
|||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_text: PAUSED
|
m_text: PAUSED
|
||||||
m_isRightToLeft: 0
|
m_isRightToLeft: 0
|
||||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
m_fontAsset: {fileID: 11400000, guid: a9e574c3959daac439febd16011e9205, type: 2}
|
||||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
m_sharedMaterial: {fileID: -6188865965018868098, guid: a9e574c3959daac439febd16011e9205, type: 2}
|
||||||
m_fontSharedMaterials: []
|
m_fontSharedMaterials: []
|
||||||
m_fontMaterial: {fileID: 0}
|
m_fontMaterial: {fileID: 0}
|
||||||
m_fontMaterials: []
|
m_fontMaterials: []
|
||||||
m_fontColor32:
|
m_fontColor32:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
rgba: 4294967295
|
rgba: 4278190080
|
||||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
m_enableVertexGradient: 0
|
m_enableVertexGradient: 0
|
||||||
m_colorMode: 3
|
m_colorMode: 3
|
||||||
m_fontColorGradient:
|
m_fontColorGradient:
|
||||||
@@ -577,13 +639,13 @@ MonoBehaviour:
|
|||||||
m_faceColor:
|
m_faceColor:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
rgba: 4294967295
|
rgba: 4294967295
|
||||||
m_fontSize: 57.25
|
m_fontSize: 44.7
|
||||||
m_fontSizeBase: 36
|
m_fontSizeBase: 44.7
|
||||||
m_fontWeight: 400
|
m_fontWeight: 400
|
||||||
m_enableAutoSizing: 1
|
m_enableAutoSizing: 0
|
||||||
m_fontSizeMin: 18
|
m_fontSizeMin: 18
|
||||||
m_fontSizeMax: 72
|
m_fontSizeMax: 72
|
||||||
m_fontStyle: 0
|
m_fontStyle: 1
|
||||||
m_HorizontalAlignment: 2
|
m_HorizontalAlignment: 2
|
||||||
m_VerticalAlignment: 512
|
m_VerticalAlignment: 512
|
||||||
m_textAlignment: 65535
|
m_textAlignment: 65535
|
||||||
@@ -634,7 +696,7 @@ GameObject:
|
|||||||
- component: {fileID: 1027039822612322709}
|
- component: {fileID: 1027039822612322709}
|
||||||
- component: {fileID: 263772625500567369}
|
- component: {fileID: 263772625500567369}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Label
|
m_Name: Text (Restart)
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
@@ -681,7 +743,7 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
|
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
|
||||||
m_Material: {fileID: 0}
|
m_Material: {fileID: 0}
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_RaycastTarget: 1
|
m_RaycastTarget: 0
|
||||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
m_Maskable: 1
|
m_Maskable: 1
|
||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
@@ -689,8 +751,8 @@ MonoBehaviour:
|
|||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_text: Restart
|
m_text: Restart
|
||||||
m_isRightToLeft: 0
|
m_isRightToLeft: 0
|
||||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
m_fontAsset: {fileID: 11400000, guid: a9e574c3959daac439febd16011e9205, type: 2}
|
||||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
m_sharedMaterial: {fileID: -6188865965018868098, guid: a9e574c3959daac439febd16011e9205, type: 2}
|
||||||
m_fontSharedMaterials: []
|
m_fontSharedMaterials: []
|
||||||
m_fontMaterial: {fileID: 0}
|
m_fontMaterial: {fileID: 0}
|
||||||
m_fontMaterials: []
|
m_fontMaterials: []
|
||||||
@@ -714,10 +776,10 @@ MonoBehaviour:
|
|||||||
m_faceColor:
|
m_faceColor:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
rgba: 4294967295
|
rgba: 4294967295
|
||||||
m_fontSize: 42.95
|
m_fontSize: 30
|
||||||
m_fontSizeBase: 36
|
m_fontSizeBase: 30
|
||||||
m_fontWeight: 400
|
m_fontWeight: 400
|
||||||
m_enableAutoSizing: 1
|
m_enableAutoSizing: 0
|
||||||
m_fontSizeMin: 18
|
m_fontSizeMin: 18
|
||||||
m_fontSizeMax: 72
|
m_fontSizeMax: 72
|
||||||
m_fontStyle: 0
|
m_fontStyle: 0
|
||||||
@@ -753,7 +815,7 @@ MonoBehaviour:
|
|||||||
m_VertexBufferAutoSizeReduction: 0
|
m_VertexBufferAutoSizeReduction: 0
|
||||||
m_useMaxVisibleDescender: 1
|
m_useMaxVisibleDescender: 1
|
||||||
m_pageToDisplay: 1
|
m_pageToDisplay: 1
|
||||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
m_margin: {x: 10, y: 10, z: 10, w: 10}
|
||||||
m_isUsingLegacyAnimationComponent: 0
|
m_isUsingLegacyAnimationComponent: 0
|
||||||
m_isVolumetricText: 0
|
m_isVolumetricText: 0
|
||||||
m_hasFontAssetChanged: 0
|
m_hasFontAssetChanged: 0
|
||||||
@@ -771,7 +833,7 @@ GameObject:
|
|||||||
- component: {fileID: 6171265826240314641}
|
- component: {fileID: 6171265826240314641}
|
||||||
- component: {fileID: 6864102600949450015}
|
- component: {fileID: 6864102600949450015}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Label
|
m_Name: Text (MainMenu)
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
@@ -818,7 +880,7 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
|
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
|
||||||
m_Material: {fileID: 0}
|
m_Material: {fileID: 0}
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_RaycastTarget: 1
|
m_RaycastTarget: 0
|
||||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
m_Maskable: 1
|
m_Maskable: 1
|
||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
@@ -826,8 +888,8 @@ MonoBehaviour:
|
|||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_text: Main Menu
|
m_text: Main Menu
|
||||||
m_isRightToLeft: 0
|
m_isRightToLeft: 0
|
||||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
m_fontAsset: {fileID: 11400000, guid: a9e574c3959daac439febd16011e9205, type: 2}
|
||||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
m_sharedMaterial: {fileID: -6188865965018868098, guid: a9e574c3959daac439febd16011e9205, type: 2}
|
||||||
m_fontSharedMaterials: []
|
m_fontSharedMaterials: []
|
||||||
m_fontMaterial: {fileID: 0}
|
m_fontMaterial: {fileID: 0}
|
||||||
m_fontMaterials: []
|
m_fontMaterials: []
|
||||||
@@ -851,10 +913,10 @@ MonoBehaviour:
|
|||||||
m_faceColor:
|
m_faceColor:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
rgba: 4294967295
|
rgba: 4294967295
|
||||||
m_fontSize: 36.4
|
m_fontSize: 30
|
||||||
m_fontSizeBase: 36
|
m_fontSizeBase: 30
|
||||||
m_fontWeight: 400
|
m_fontWeight: 400
|
||||||
m_enableAutoSizing: 1
|
m_enableAutoSizing: 0
|
||||||
m_fontSizeMin: 18
|
m_fontSizeMin: 18
|
||||||
m_fontSizeMax: 72
|
m_fontSizeMax: 72
|
||||||
m_fontStyle: 0
|
m_fontStyle: 0
|
||||||
@@ -890,7 +952,7 @@ MonoBehaviour:
|
|||||||
m_VertexBufferAutoSizeReduction: 0
|
m_VertexBufferAutoSizeReduction: 0
|
||||||
m_useMaxVisibleDescender: 1
|
m_useMaxVisibleDescender: 1
|
||||||
m_pageToDisplay: 1
|
m_pageToDisplay: 1
|
||||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
m_margin: {x: 10, y: 10, z: 10, w: 10}
|
||||||
m_isUsingLegacyAnimationComponent: 0
|
m_isUsingLegacyAnimationComponent: 0
|
||||||
m_isVolumetricText: 0
|
m_isVolumetricText: 0
|
||||||
m_hasFontAssetChanged: 0
|
m_hasFontAssetChanged: 0
|
||||||
@@ -922,18 +984,18 @@ RectTransform:
|
|||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 8998480090649882076}
|
m_GameObject: {fileID: 8998480090649882076}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 5392971194067563766}
|
- {fileID: 5392971194067563766}
|
||||||
m_Father: {fileID: 8980764968637402581}
|
m_Father: {fileID: 6224274704053806388}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 0}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 180, y: 48}
|
m_SizeDelta: {x: 400, y: 50}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &2049058910800172261
|
--- !u!222 &2049058910800172261
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
@@ -963,8 +1025,8 @@ MonoBehaviour:
|
|||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_Sprite: {fileID: 0}
|
m_Sprite: {fileID: -4571551822685222379, guid: 4c4c10e49c2777748899d811a0e67689, type: 3}
|
||||||
m_Type: 0
|
m_Type: 1
|
||||||
m_PreserveAspect: 0
|
m_PreserveAspect: 0
|
||||||
m_FillCenter: 1
|
m_FillCenter: 1
|
||||||
m_FillMethod: 4
|
m_FillMethod: 4
|
||||||
@@ -972,7 +1034,7 @@ MonoBehaviour:
|
|||||||
m_FillClockwise: 1
|
m_FillClockwise: 1
|
||||||
m_FillOrigin: 0
|
m_FillOrigin: 0
|
||||||
m_UseSpriteMesh: 0
|
m_UseSpriteMesh: 0
|
||||||
m_PixelsPerUnitMultiplier: 1
|
m_PixelsPerUnitMultiplier: 1.94
|
||||||
--- !u!114 &6144314195671038853
|
--- !u!114 &6144314195671038853
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@@ -1,5 +1,142 @@
|
|||||||
%YAML 1.1
|
%YAML 1.1
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &287223920623125733
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4593031335885359894}
|
||||||
|
- component: {fileID: 2402291059127653790}
|
||||||
|
- component: {fileID: 6396269881041885796}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Text (Result)
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &4593031335885359894
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 287223920623125733}
|
||||||
|
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: 552927392666894915}
|
||||||
|
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_SizeDelta: {x: 317.9436, y: 51}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &2402291059127653790
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 287223920623125733}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &6396269881041885796
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 287223920623125733}
|
||||||
|
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: 0
|
||||||
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_text: Result
|
||||||
|
m_isRightToLeft: 0
|
||||||
|
m_fontAsset: {fileID: 11400000, guid: a9e574c3959daac439febd16011e9205, type: 2}
|
||||||
|
m_sharedMaterial: {fileID: -6188865965018868098, guid: a9e574c3959daac439febd16011e9205, type: 2}
|
||||||
|
m_fontSharedMaterials: []
|
||||||
|
m_fontMaterial: {fileID: 0}
|
||||||
|
m_fontMaterials: []
|
||||||
|
m_fontColor32:
|
||||||
|
serializedVersion: 2
|
||||||
|
rgba: 4278190080
|
||||||
|
m_fontColor: {r: 0, g: 0, b: 0, 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: 30
|
||||||
|
m_fontSizeBase: 30
|
||||||
|
m_fontWeight: 400
|
||||||
|
m_enableAutoSizing: 0
|
||||||
|
m_fontSizeMin: 18
|
||||||
|
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: 5, y: 5, z: 5, w: 5}
|
||||||
|
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 &999041870156624000
|
--- !u!1 &999041870156624000
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -12,7 +149,7 @@ GameObject:
|
|||||||
- component: {fileID: 8382717949319705333}
|
- component: {fileID: 8382717949319705333}
|
||||||
- component: {fileID: 7260907240647165918}
|
- component: {fileID: 7260907240647165918}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Label
|
m_Name: Text (MainMenu)
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
@@ -59,7 +196,7 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
|
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
|
||||||
m_Material: {fileID: 0}
|
m_Material: {fileID: 0}
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_RaycastTarget: 1
|
m_RaycastTarget: 0
|
||||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
m_Maskable: 1
|
m_Maskable: 1
|
||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
@@ -67,14 +204,14 @@ MonoBehaviour:
|
|||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_text: Main Menu
|
m_text: Main Menu
|
||||||
m_isRightToLeft: 0
|
m_isRightToLeft: 0
|
||||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
m_fontAsset: {fileID: 11400000, guid: a9e574c3959daac439febd16011e9205, type: 2}
|
||||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
m_sharedMaterial: {fileID: -6188865965018868098, guid: a9e574c3959daac439febd16011e9205, type: 2}
|
||||||
m_fontSharedMaterials: []
|
m_fontSharedMaterials: []
|
||||||
m_fontMaterial: {fileID: 0}
|
m_fontMaterial: {fileID: 0}
|
||||||
m_fontMaterials: []
|
m_fontMaterials: []
|
||||||
m_fontColor32:
|
m_fontColor32:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
rgba: 4294967295
|
rgba: 4278190080
|
||||||
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
|
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
m_enableVertexGradient: 0
|
m_enableVertexGradient: 0
|
||||||
m_colorMode: 3
|
m_colorMode: 3
|
||||||
@@ -87,15 +224,15 @@ MonoBehaviour:
|
|||||||
m_spriteAsset: {fileID: 0}
|
m_spriteAsset: {fileID: 0}
|
||||||
m_tintAllSprites: 0
|
m_tintAllSprites: 0
|
||||||
m_StyleSheet: {fileID: 0}
|
m_StyleSheet: {fileID: 0}
|
||||||
m_TextStyleHashCode: 0
|
m_TextStyleHashCode: -1183493901
|
||||||
m_overrideHtmlColors: 0
|
m_overrideHtmlColors: 0
|
||||||
m_faceColor:
|
m_faceColor:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
rgba: 4294967295
|
rgba: 4294967295
|
||||||
m_fontSize: 36
|
m_fontSize: 30
|
||||||
m_fontSizeBase: 36
|
m_fontSizeBase: 30
|
||||||
m_fontWeight: 400
|
m_fontWeight: 400
|
||||||
m_enableAutoSizing: 1
|
m_enableAutoSizing: 0
|
||||||
m_fontSizeMin: 18
|
m_fontSizeMin: 18
|
||||||
m_fontSizeMax: 72
|
m_fontSizeMax: 72
|
||||||
m_fontStyle: 0
|
m_fontStyle: 0
|
||||||
@@ -131,7 +268,7 @@ MonoBehaviour:
|
|||||||
m_VertexBufferAutoSizeReduction: 0
|
m_VertexBufferAutoSizeReduction: 0
|
||||||
m_useMaxVisibleDescender: 1
|
m_useMaxVisibleDescender: 1
|
||||||
m_pageToDisplay: 1
|
m_pageToDisplay: 1
|
||||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
m_margin: {x: 5, y: 5, z: 5, w: 5}
|
||||||
m_isUsingLegacyAnimationComponent: 0
|
m_isUsingLegacyAnimationComponent: 0
|
||||||
m_isVolumetricText: 0
|
m_isVolumetricText: 0
|
||||||
m_hasFontAssetChanged: 0
|
m_hasFontAssetChanged: 0
|
||||||
@@ -149,7 +286,7 @@ GameObject:
|
|||||||
- component: {fileID: 5737558796278534139}
|
- component: {fileID: 5737558796278534139}
|
||||||
- component: {fileID: 6423146057671714179}
|
- component: {fileID: 6423146057671714179}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Label
|
m_Name: Text (Restart)
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
@@ -196,7 +333,7 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
|
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
|
||||||
m_Material: {fileID: 0}
|
m_Material: {fileID: 0}
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_RaycastTarget: 1
|
m_RaycastTarget: 0
|
||||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
m_Maskable: 1
|
m_Maskable: 1
|
||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
@@ -204,14 +341,14 @@ MonoBehaviour:
|
|||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_text: Restart
|
m_text: Restart
|
||||||
m_isRightToLeft: 0
|
m_isRightToLeft: 0
|
||||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
m_fontAsset: {fileID: 11400000, guid: a9e574c3959daac439febd16011e9205, type: 2}
|
||||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
m_sharedMaterial: {fileID: -6188865965018868098, guid: a9e574c3959daac439febd16011e9205, type: 2}
|
||||||
m_fontSharedMaterials: []
|
m_fontSharedMaterials: []
|
||||||
m_fontMaterial: {fileID: 0}
|
m_fontMaterial: {fileID: 0}
|
||||||
m_fontMaterials: []
|
m_fontMaterials: []
|
||||||
m_fontColor32:
|
m_fontColor32:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
rgba: 4294967295
|
rgba: 4278190080
|
||||||
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
|
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
m_enableVertexGradient: 0
|
m_enableVertexGradient: 0
|
||||||
m_colorMode: 3
|
m_colorMode: 3
|
||||||
@@ -224,15 +361,15 @@ MonoBehaviour:
|
|||||||
m_spriteAsset: {fileID: 0}
|
m_spriteAsset: {fileID: 0}
|
||||||
m_tintAllSprites: 0
|
m_tintAllSprites: 0
|
||||||
m_StyleSheet: {fileID: 0}
|
m_StyleSheet: {fileID: 0}
|
||||||
m_TextStyleHashCode: 0
|
m_TextStyleHashCode: -1183493901
|
||||||
m_overrideHtmlColors: 0
|
m_overrideHtmlColors: 0
|
||||||
m_faceColor:
|
m_faceColor:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
rgba: 4294967295
|
rgba: 4294967295
|
||||||
m_fontSize: 36
|
m_fontSize: 30
|
||||||
m_fontSizeBase: 36
|
m_fontSizeBase: 30
|
||||||
m_fontWeight: 400
|
m_fontWeight: 400
|
||||||
m_enableAutoSizing: 1
|
m_enableAutoSizing: 0
|
||||||
m_fontSizeMin: 18
|
m_fontSizeMin: 18
|
||||||
m_fontSizeMax: 72
|
m_fontSizeMax: 72
|
||||||
m_fontStyle: 0
|
m_fontStyle: 0
|
||||||
@@ -268,7 +405,7 @@ MonoBehaviour:
|
|||||||
m_VertexBufferAutoSizeReduction: 0
|
m_VertexBufferAutoSizeReduction: 0
|
||||||
m_useMaxVisibleDescender: 1
|
m_useMaxVisibleDescender: 1
|
||||||
m_pageToDisplay: 1
|
m_pageToDisplay: 1
|
||||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
m_margin: {x: 5, y: 5, z: 5, w: 5}
|
||||||
m_isUsingLegacyAnimationComponent: 0
|
m_isUsingLegacyAnimationComponent: 0
|
||||||
m_isVolumetricText: 0
|
m_isVolumetricText: 0
|
||||||
m_hasFontAssetChanged: 0
|
m_hasFontAssetChanged: 0
|
||||||
@@ -300,18 +437,18 @@ RectTransform:
|
|||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 6011430087630309393}
|
m_GameObject: {fileID: 6011430087630309393}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 7716741039240103859}
|
- {fileID: 7716741039240103859}
|
||||||
m_Father: {fileID: 1711089644684175522}
|
m_Father: {fileID: 552927392666894915}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 180, y: 48}
|
m_SizeDelta: {x: 320, y: 48}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &5645585721074283479
|
--- !u!222 &5645585721074283479
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
@@ -341,8 +478,8 @@ MonoBehaviour:
|
|||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_Sprite: {fileID: 0}
|
m_Sprite: {fileID: -4571551822685222379, guid: 4c4c10e49c2777748899d811a0e67689, type: 3}
|
||||||
m_Type: 0
|
m_Type: 1
|
||||||
m_PreserveAspect: 0
|
m_PreserveAspect: 0
|
||||||
m_FillCenter: 1
|
m_FillCenter: 1
|
||||||
m_FillMethod: 4
|
m_FillMethod: 4
|
||||||
@@ -350,7 +487,7 @@ MonoBehaviour:
|
|||||||
m_FillClockwise: 1
|
m_FillClockwise: 1
|
||||||
m_FillOrigin: 0
|
m_FillOrigin: 0
|
||||||
m_UseSpriteMesh: 0
|
m_UseSpriteMesh: 0
|
||||||
m_PixelsPerUnitMultiplier: 1
|
m_PixelsPerUnitMultiplier: 2
|
||||||
--- !u!114 &8067593845912844089
|
--- !u!114 &8067593845912844089
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -420,18 +557,18 @@ RectTransform:
|
|||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 6734942153781218244}
|
m_GameObject: {fileID: 6734942153781218244}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 1711089644684175522}
|
m_Father: {fileID: 552927392666894915}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 300, y: 64}
|
m_SizeDelta: {x: 330, y: 64}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 1}
|
||||||
--- !u!222 &8517643472744692661
|
--- !u!222 &8517643472744692661
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -462,15 +599,15 @@ MonoBehaviour:
|
|||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_text: GAME OVER
|
m_text: GAME OVER
|
||||||
m_isRightToLeft: 0
|
m_isRightToLeft: 0
|
||||||
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
m_fontAsset: {fileID: 11400000, guid: a9e574c3959daac439febd16011e9205, type: 2}
|
||||||
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
m_sharedMaterial: {fileID: -6188865965018868098, guid: a9e574c3959daac439febd16011e9205, type: 2}
|
||||||
m_fontSharedMaterials: []
|
m_fontSharedMaterials: []
|
||||||
m_fontMaterial: {fileID: 0}
|
m_fontMaterial: {fileID: 0}
|
||||||
m_fontMaterials: []
|
m_fontMaterials: []
|
||||||
m_fontColor32:
|
m_fontColor32:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
rgba: 4294967295
|
rgba: 4278190080
|
||||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
m_enableVertexGradient: 0
|
m_enableVertexGradient: 0
|
||||||
m_colorMode: 3
|
m_colorMode: 3
|
||||||
m_fontColorGradient:
|
m_fontColorGradient:
|
||||||
@@ -482,18 +619,18 @@ MonoBehaviour:
|
|||||||
m_spriteAsset: {fileID: 0}
|
m_spriteAsset: {fileID: 0}
|
||||||
m_tintAllSprites: 0
|
m_tintAllSprites: 0
|
||||||
m_StyleSheet: {fileID: 0}
|
m_StyleSheet: {fileID: 0}
|
||||||
m_TextStyleHashCode: 0
|
m_TextStyleHashCode: -1183493901
|
||||||
m_overrideHtmlColors: 0
|
m_overrideHtmlColors: 0
|
||||||
m_faceColor:
|
m_faceColor:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
rgba: 4294967295
|
rgba: 4294967295
|
||||||
m_fontSize: 36
|
m_fontSize: 40
|
||||||
m_fontSizeBase: 36
|
m_fontSizeBase: 40
|
||||||
m_fontWeight: 400
|
m_fontWeight: 400
|
||||||
m_enableAutoSizing: 1
|
m_enableAutoSizing: 0
|
||||||
m_fontSizeMin: 18
|
m_fontSizeMin: 18
|
||||||
m_fontSizeMax: 72
|
m_fontSizeMax: 72
|
||||||
m_fontStyle: 0
|
m_fontStyle: 1
|
||||||
m_HorizontalAlignment: 2
|
m_HorizontalAlignment: 2
|
||||||
m_VerticalAlignment: 512
|
m_VerticalAlignment: 512
|
||||||
m_textAlignment: 65535
|
m_textAlignment: 65535
|
||||||
@@ -542,15 +679,14 @@ GameObject:
|
|||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 1711089644684175522}
|
- component: {fileID: 1711089644684175522}
|
||||||
- component: {fileID: 2645373253716865156}
|
- component: {fileID: 2645373253716865156}
|
||||||
- component: {fileID: 3592721359535107435}
|
- component: {fileID: -2277025653673582644}
|
||||||
- component: {fileID: 732723309192048358}
|
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: ResultPanel
|
m_Name: ResultPanel
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 0
|
m_IsActive: 1
|
||||||
--- !u!224 &1711089644684175522
|
--- !u!224 &1711089644684175522
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -563,9 +699,7 @@ RectTransform:
|
|||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 8189959685470005628}
|
- {fileID: 552927392666894915}
|
||||||
- {fileID: 1427833870319099182}
|
|
||||||
- {fileID: 5791868949534554285}
|
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
@@ -581,7 +715,7 @@ CanvasRenderer:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 6869455415096409219}
|
m_GameObject: {fileID: 6869455415096409219}
|
||||||
m_CullTransparentMesh: 1
|
m_CullTransparentMesh: 1
|
||||||
--- !u!114 &3592721359535107435
|
--- !u!114 &-2277025653673582644
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
@@ -590,34 +724,62 @@ MonoBehaviour:
|
|||||||
m_GameObject: {fileID: 6869455415096409219}
|
m_GameObject: {fileID: 6869455415096409219}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_EditorHideFlags: 0
|
m_EditorHideFlags: 0
|
||||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
m_Script: {fileID: 11500000, guid: b0b04ab8a2ef00b4e8d36a96e4f034d8, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
m_EditorClassIdentifier: Assembly-CSharp::Minesweeper.Presentation.Views.ResultView
|
||||||
m_Material: {fileID: 0}
|
root: {fileID: 6869455415096409219}
|
||||||
m_Color: {r: 0.08, g: 0.08, b: 0.08, a: 0.72}
|
restartButton: {fileID: 4556636970913567574}
|
||||||
m_RaycastTarget: 1
|
mainMenuButton: {fileID: 8067593845912844089}
|
||||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
resultText: {fileID: 6396269881041885796}
|
||||||
m_Maskable: 1
|
--- !u!1 &8309714601234156502
|
||||||
m_OnCullStateChanged:
|
GameObject:
|
||||||
m_PersistentCalls:
|
m_ObjectHideFlags: 0
|
||||||
m_Calls: []
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
m_Sprite: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_Type: 0
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_PreserveAspect: 0
|
serializedVersion: 6
|
||||||
m_FillCenter: 1
|
m_Component:
|
||||||
m_FillMethod: 4
|
- component: {fileID: 552927392666894915}
|
||||||
m_FillAmount: 1
|
- component: {fileID: 4744414248438308959}
|
||||||
m_FillClockwise: 1
|
- component: {fileID: 3970833251751774975}
|
||||||
m_FillOrigin: 0
|
- component: {fileID: 4674113591805833902}
|
||||||
m_UseSpriteMesh: 0
|
m_Layer: 0
|
||||||
m_PixelsPerUnitMultiplier: 1
|
m_Name: Content
|
||||||
--- !u!114 &732723309192048358
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &552927392666894915
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8309714601234156502}
|
||||||
|
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:
|
||||||
|
- {fileID: 8189959685470005628}
|
||||||
|
- {fileID: 1427833870319099182}
|
||||||
|
- {fileID: 5791868949534554285}
|
||||||
|
- {fileID: 4593031335885359894}
|
||||||
|
m_Father: {fileID: 1711089644684175522}
|
||||||
|
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: 0}
|
||||||
|
m_SizeDelta: {x: 400, y: 350}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!114 &4744414248438308959
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 6869455415096409219}
|
m_GameObject: {fileID: 8309714601234156502}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_EditorHideFlags: 0
|
m_EditorHideFlags: 0
|
||||||
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
|
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
|
||||||
@@ -637,6 +799,44 @@ MonoBehaviour:
|
|||||||
m_ChildScaleWidth: 0
|
m_ChildScaleWidth: 0
|
||||||
m_ChildScaleHeight: 0
|
m_ChildScaleHeight: 0
|
||||||
m_ReverseArrangement: 0
|
m_ReverseArrangement: 0
|
||||||
|
--- !u!222 &3970833251751774975
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8309714601234156502}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &4674113591805833902
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8309714601234156502}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image
|
||||||
|
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_Sprite: {fileID: 3130755090995886313, guid: 4c4c10e49c2777748899d811a0e67689, type: 3}
|
||||||
|
m_Type: 1
|
||||||
|
m_PreserveAspect: 0
|
||||||
|
m_FillCenter: 1
|
||||||
|
m_FillMethod: 4
|
||||||
|
m_FillAmount: 1
|
||||||
|
m_FillClockwise: 1
|
||||||
|
m_FillOrigin: 0
|
||||||
|
m_UseSpriteMesh: 0
|
||||||
|
m_PixelsPerUnitMultiplier: 1
|
||||||
--- !u!1 &8555883531386717516
|
--- !u!1 &8555883531386717516
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -663,18 +863,18 @@ RectTransform:
|
|||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 8555883531386717516}
|
m_GameObject: {fileID: 8555883531386717516}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 4475925576080504750}
|
- {fileID: 4475925576080504750}
|
||||||
m_Father: {fileID: 1711089644684175522}
|
m_Father: {fileID: 552927392666894915}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 180, y: 48}
|
m_SizeDelta: {x: 320, y: 48}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &2044360681731469335
|
--- !u!222 &2044360681731469335
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
@@ -704,8 +904,8 @@ MonoBehaviour:
|
|||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_Sprite: {fileID: 0}
|
m_Sprite: {fileID: -4571551822685222379, guid: 4c4c10e49c2777748899d811a0e67689, type: 3}
|
||||||
m_Type: 0
|
m_Type: 1
|
||||||
m_PreserveAspect: 0
|
m_PreserveAspect: 0
|
||||||
m_FillCenter: 1
|
m_FillCenter: 1
|
||||||
m_FillMethod: 4
|
m_FillMethod: 4
|
||||||
@@ -713,7 +913,7 @@ MonoBehaviour:
|
|||||||
m_FillClockwise: 1
|
m_FillClockwise: 1
|
||||||
m_FillOrigin: 0
|
m_FillOrigin: 0
|
||||||
m_UseSpriteMesh: 0
|
m_UseSpriteMesh: 0
|
||||||
m_PixelsPerUnitMultiplier: 1
|
m_PixelsPerUnitMultiplier: 2
|
||||||
--- !u!114 &4556636970913567574
|
--- !u!114 &4556636970913567574
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace Minesweeper.Config
|
|
||||||
{
|
|
||||||
[CreateAssetMenu(fileName = "MinesweeperGameConfig", menuName = "Minesweeper/Game Config")]
|
|
||||||
public sealed class MinesweeperGameConfig : ScriptableObject
|
|
||||||
{
|
|
||||||
[field: SerializeField, Min(1)] public int Width { get; private set; } = 9;
|
|
||||||
[field: SerializeField, Min(1)] public int Height { get; private set; } = 9;
|
|
||||||
[field: SerializeField, Min(1)] public int MinesCount { get; private set; } = 10;
|
|
||||||
[field: SerializeField] public KeyCode RestartKey { get; private set; } = KeyCode.R;
|
|
||||||
|
|
||||||
public bool IsValid => Width > 0 && Height > 0 && MinesCount > 0 && MinesCount < Width * Height;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
using System;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace Minesweeper.Config
|
|
||||||
{
|
|
||||||
[Serializable]
|
|
||||||
public sealed class MinesweeperScreenCatalog
|
|
||||||
{
|
|
||||||
[field: SerializeField] public GameObject MainMenuPanelPrefab { get; private set; }
|
|
||||||
[field: SerializeField] public GameObject BoardGridPrefab { get; private set; }
|
|
||||||
[field: SerializeField] public GameObject PausePanelPrefab { get; private set; }
|
|
||||||
[field: SerializeField] public GameObject ResultPanelPrefab { get; private set; }
|
|
||||||
|
|
||||||
public bool IsValid => MainMenuPanelPrefab != null && BoardGridPrefab != null && PausePanelPrefab != null && ResultPanelPrefab != null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 6d0009ea7e70ee548a09cd95d482ec83
|
|
||||||
@@ -1,120 +0,0 @@
|
|||||||
using Minesweeper.Core;
|
|
||||||
using Minesweeper.ECS.Components;
|
|
||||||
using Unity.Collections;
|
|
||||||
using Unity.Entities;
|
|
||||||
|
|
||||||
namespace Minesweeper.ECS
|
|
||||||
{
|
|
||||||
public sealed class BoardEcsSyncService : IBoardEcsSyncService
|
|
||||||
{
|
|
||||||
public void ClearBoard()
|
|
||||||
{
|
|
||||||
if (!TryGetEntityManager(out var entityManager))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ClearCells(entityManager);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SyncBoard(IBoardService boardService)
|
|
||||||
{
|
|
||||||
if (!TryGetEntityManager(out var entityManager))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ClearCells(entityManager);
|
|
||||||
|
|
||||||
var boardEntity = GetOrCreateSingleton<BoardConfigComponent>(entityManager);
|
|
||||||
entityManager.SetComponentData(boardEntity, new BoardConfigComponent
|
|
||||||
{
|
|
||||||
Width = boardService.Width,
|
|
||||||
Height = boardService.Height,
|
|
||||||
MinesCount = boardService.MinesCount
|
|
||||||
});
|
|
||||||
|
|
||||||
var archetype = entityManager.CreateArchetype(typeof(CellComponent));
|
|
||||||
var cells = boardService.GetCells();
|
|
||||||
for (var i = 0; i < cells.Count; i++)
|
|
||||||
{
|
|
||||||
var cell = cells[i];
|
|
||||||
var entity = entityManager.CreateEntity(archetype);
|
|
||||||
entityManager.SetComponentData(entity, new CellComponent
|
|
||||||
{
|
|
||||||
X = cell.X,
|
|
||||||
Y = cell.Y,
|
|
||||||
IsMine = ToByte(cell.IsMine),
|
|
||||||
IsOpened = ToByte(cell.IsOpened),
|
|
||||||
IsFlagged = ToByte(cell.IsFlagged),
|
|
||||||
NeighborMines = cell.NeighborMines
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SyncGameState(GameState state, bool hasFirstClick)
|
|
||||||
{
|
|
||||||
if (!TryGetEntityManager(out var entityManager))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var stateEntity = GetOrCreateSingleton<GameStateComponent>(entityManager);
|
|
||||||
entityManager.SetComponentData(stateEntity, new GameStateComponent
|
|
||||||
{
|
|
||||||
State = state,
|
|
||||||
HasFirstClick = ToByte(hasFirstClick)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private static bool TryGetEntityManager(out EntityManager entityManager)
|
|
||||||
{
|
|
||||||
var world = World.DefaultGameObjectInjectionWorld;
|
|
||||||
if (world == null || !world.IsCreated)
|
|
||||||
{
|
|
||||||
entityManager = default;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
entityManager = world.EntityManager;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void ClearCells(EntityManager entityManager)
|
|
||||||
{
|
|
||||||
var query = entityManager.CreateEntityQuery(typeof(CellComponent));
|
|
||||||
entityManager.DestroyEntity(query);
|
|
||||||
query.Dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static Entity GetOrCreateSingleton<T>(EntityManager entityManager) where T : unmanaged, IComponentData
|
|
||||||
{
|
|
||||||
var query = entityManager.CreateEntityQuery(typeof(T));
|
|
||||||
Entity entity;
|
|
||||||
|
|
||||||
if (query.IsEmptyIgnoreFilter)
|
|
||||||
{
|
|
||||||
entity = entityManager.CreateEntity(typeof(T));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var entities = query.ToEntityArray(Allocator.Temp);
|
|
||||||
entity = entities[0];
|
|
||||||
for (var i = 1; i < entities.Length; i++)
|
|
||||||
{
|
|
||||||
entityManager.DestroyEntity(entities[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
entities.Dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
query.Dispose();
|
|
||||||
return entity;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static byte ToByte(bool value)
|
|
||||||
{
|
|
||||||
return value ? (byte)1 : (byte)0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 210d08f5d5948674fa0df51ed6a785b0
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
using Minesweeper.Commands;
|
|
||||||
using Minesweeper.Config;
|
|
||||||
using Minesweeper.Core;
|
|
||||||
using UnityEngine.InputSystem;
|
|
||||||
using VContainer.Unity;
|
|
||||||
|
|
||||||
namespace Minesweeper.Infrastructure
|
|
||||||
{
|
|
||||||
public sealed class RestartKeyInputService : ITickable
|
|
||||||
{
|
|
||||||
private readonly IGameCommandDispatcher commandDispatcher;
|
|
||||||
private readonly MinesweeperGameConfig config;
|
|
||||||
private readonly IGameStateService gameStateService;
|
|
||||||
|
|
||||||
public RestartKeyInputService(IGameCommandDispatcher commandDispatcher, MinesweeperGameConfig config, IGameStateService gameStateService)
|
|
||||||
{
|
|
||||||
this.commandDispatcher = commandDispatcher;
|
|
||||||
this.config = config;
|
|
||||||
this.gameStateService = gameStateService;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Tick()
|
|
||||||
{
|
|
||||||
var keyboard = Keyboard.current;
|
|
||||||
if (keyboard == null || !IsRestartPressed(keyboard))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (gameStateService.Current == GameState.FieldSelection)
|
|
||||||
{
|
|
||||||
commandDispatcher.Dispatch(new StartGameCommand());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
commandDispatcher.Dispatch(new RestartCommand());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool IsRestartPressed(Keyboard keyboard)
|
|
||||||
{
|
|
||||||
if (config.RestartKey == UnityEngine.KeyCode.R)
|
|
||||||
{
|
|
||||||
return keyboard.rKey.wasPressedThisFrame;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: c87c15d092dd420b85a09cc786496948
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
using Minesweeper.Config;
|
|
||||||
using Minesweeper.Core;
|
|
||||||
using Minesweeper.Presentation.Views;
|
|
||||||
using TMPro;
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.UI;
|
|
||||||
|
|
||||||
namespace Minesweeper.Presentation.Factories
|
|
||||||
{
|
|
||||||
public sealed class CellViewFactory : ICellViewFactory
|
|
||||||
{
|
|
||||||
private const string ContentImagePath = "Content/Image";
|
|
||||||
private const string ContentLabelPath = "Content/Text (TMP)";
|
|
||||||
|
|
||||||
private readonly MinesweeperUiConfig uiConfig;
|
|
||||||
|
|
||||||
public CellViewFactory(MinesweeperUiConfig uiConfig)
|
|
||||||
{
|
|
||||||
this.uiConfig = uiConfig;
|
|
||||||
}
|
|
||||||
|
|
||||||
public CellView CreateCell(BoardCellData cell, Transform parent)
|
|
||||||
{
|
|
||||||
var prefab = uiConfig.CellButtonPrefab;
|
|
||||||
var go = prefab != null ? Object.Instantiate(prefab, parent) : CreateFallbackCell(parent);
|
|
||||||
go.name = BuildCellName(cell.X, cell.Y, cell.DisplayValue);
|
|
||||||
|
|
||||||
var view = go.GetComponent<CellView>();
|
|
||||||
if (view == null)
|
|
||||||
{
|
|
||||||
view = go.AddComponent<CellView>();
|
|
||||||
}
|
|
||||||
|
|
||||||
var button = go.GetComponent<Button>();
|
|
||||||
var backgroundImage = go.GetComponent<Image>();
|
|
||||||
var contentImage = FindComponent<Image>(go.transform, ContentImagePath);
|
|
||||||
var label = FindComponent<TMP_Text>(go.transform, ContentLabelPath);
|
|
||||||
view.Bind(button, backgroundImage, contentImage, label);
|
|
||||||
view.AutoBind();
|
|
||||||
view.Initialize(cell.X, cell.Y);
|
|
||||||
return view;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string BuildCellName(int x, int y, int value, bool isMine)
|
|
||||||
{
|
|
||||||
return $"bt_{x}_{y}_{(isMine ? "M" : value.ToString())}";
|
|
||||||
}
|
|
||||||
|
|
||||||
public string BuildCellName(int x, int y, string displayValue)
|
|
||||||
{
|
|
||||||
return $"bt_{x}_{y}_{displayValue}";
|
|
||||||
}
|
|
||||||
|
|
||||||
private static T FindComponent<T>(Transform root, string path) where T : Component
|
|
||||||
{
|
|
||||||
var child = root.Find(path);
|
|
||||||
return child != null ? child.GetComponent<T>() : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static GameObject CreateFallbackCell(Transform parent)
|
|
||||||
{
|
|
||||||
var go = new GameObject("Cell", typeof(RectTransform), typeof(CanvasRenderer), typeof(Image), typeof(Button));
|
|
||||||
go.transform.SetParent(parent, false);
|
|
||||||
|
|
||||||
var content = new GameObject("Content", typeof(RectTransform));
|
|
||||||
content.transform.SetParent(go.transform, false);
|
|
||||||
Stretch(content.GetComponent<RectTransform>());
|
|
||||||
|
|
||||||
var image = new GameObject("Image", typeof(RectTransform), typeof(CanvasRenderer), typeof(Image));
|
|
||||||
image.transform.SetParent(content.transform, false);
|
|
||||||
Stretch(image.GetComponent<RectTransform>());
|
|
||||||
|
|
||||||
var text = new GameObject("Text (TMP)", typeof(RectTransform), typeof(CanvasRenderer), typeof(TextMeshProUGUI));
|
|
||||||
text.transform.SetParent(content.transform, false);
|
|
||||||
Stretch(text.GetComponent<RectTransform>());
|
|
||||||
|
|
||||||
var label = text.GetComponent<TextMeshProUGUI>();
|
|
||||||
label.alignment = TextAlignmentOptions.Center;
|
|
||||||
label.enableAutoSizing = true;
|
|
||||||
return go;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void Stretch(RectTransform rectTransform)
|
|
||||||
{
|
|
||||||
rectTransform.anchorMin = Vector2.zero;
|
|
||||||
rectTransform.anchorMax = Vector2.one;
|
|
||||||
rectTransform.offsetMin = Vector2.zero;
|
|
||||||
rectTransform.offsetMax = Vector2.zero;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,127 +0,0 @@
|
|||||||
using Minesweeper.Config;
|
|
||||||
using Minesweeper.Presentation.Views;
|
|
||||||
using TMPro;
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.UI;
|
|
||||||
|
|
||||||
namespace Minesweeper.Presentation.Factories
|
|
||||||
{
|
|
||||||
public sealed class MinesweeperScreenBootstrapper
|
|
||||||
{
|
|
||||||
private const string MainMenuPanelName = "MainMenuPanel";
|
|
||||||
private const string BoardGridName = "BoardGrid";
|
|
||||||
private const string PausePanelName = "PausePanel";
|
|
||||||
private const string ResultPanelName = "ResultPanel";
|
|
||||||
private const string StartButtonPath = "StartButton";
|
|
||||||
private const string RestartButtonPath = "RestartButton";
|
|
||||||
private const string ContinueButtonPath = "ContinueButton";
|
|
||||||
private const string MainMenuButtonPath = "MainMenuButton";
|
|
||||||
private const string ResultTextPath = "ResultText";
|
|
||||||
|
|
||||||
public MinesweeperScreenRefs Spawn(Transform contentRoot, MinesweeperScreenCatalog catalog)
|
|
||||||
{
|
|
||||||
if (contentRoot == null)
|
|
||||||
{
|
|
||||||
Debug.LogError("Minesweeper screen bootstrap failed: Content root is not assigned.");
|
|
||||||
return default;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (catalog == null || !catalog.IsValid)
|
|
||||||
{
|
|
||||||
Debug.LogError("Minesweeper screen bootstrap failed: screen catalog prefab references are incomplete.");
|
|
||||||
return default;
|
|
||||||
}
|
|
||||||
|
|
||||||
ClearContent(contentRoot);
|
|
||||||
|
|
||||||
var mainMenu = SpawnScreen(catalog.MainMenuPanelPrefab, contentRoot, MainMenuPanelName, 0);
|
|
||||||
var board = SpawnScreen(catalog.BoardGridPrefab, contentRoot, BoardGridName, 1);
|
|
||||||
var pause = SpawnScreen(catalog.PausePanelPrefab, contentRoot, PausePanelName, 2);
|
|
||||||
var result = SpawnScreen(catalog.ResultPanelPrefab, contentRoot, ResultPanelName, 3);
|
|
||||||
|
|
||||||
var mainMenuView = RequireComponent<MainMenuView>(mainMenu.transform, MainMenuPanelName);
|
|
||||||
mainMenuView.Bind(mainMenu, RequireChildComponent<Button>(mainMenu.transform, StartButtonPath));
|
|
||||||
|
|
||||||
var refs = new MinesweeperScreenRefs(
|
|
||||||
mainMenuView,
|
|
||||||
RequireComponent<RectTransform>(board.transform, BoardGridName),
|
|
||||||
RequireComponent<GridLayoutGroup>(board.transform, BoardGridName),
|
|
||||||
pause,
|
|
||||||
RequireChildComponent<Button>(pause.transform, RestartButtonPath),
|
|
||||||
RequireChildComponent<Button>(pause.transform, ContinueButtonPath),
|
|
||||||
RequireChildComponent<Button>(pause.transform, MainMenuButtonPath),
|
|
||||||
result,
|
|
||||||
RequireChildComponent<Button>(result.transform, RestartButtonPath),
|
|
||||||
RequireChildComponent<Button>(result.transform, MainMenuButtonPath),
|
|
||||||
RequireChildComponent<TMP_Text>(result.transform, ResultTextPath));
|
|
||||||
|
|
||||||
mainMenu.SetActive(false);
|
|
||||||
board.SetActive(false);
|
|
||||||
pause.SetActive(false);
|
|
||||||
result.SetActive(false);
|
|
||||||
|
|
||||||
return refs;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static GameObject SpawnScreen(GameObject prefab, Transform parent, string expectedName, int siblingIndex)
|
|
||||||
{
|
|
||||||
var instance = Object.Instantiate(prefab, parent, false);
|
|
||||||
instance.name = expectedName;
|
|
||||||
instance.transform.SetSiblingIndex(siblingIndex);
|
|
||||||
Stretch(instance.GetComponent<RectTransform>());
|
|
||||||
return instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void ClearContent(Transform contentRoot)
|
|
||||||
{
|
|
||||||
for (var i = contentRoot.childCount - 1; i >= 0; i--)
|
|
||||||
{
|
|
||||||
var child = contentRoot.GetChild(i);
|
|
||||||
child.SetParent(null, false);
|
|
||||||
Object.Destroy(child.gameObject);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static T RequireComponent<T>(Transform root, string ownerName) where T : Component
|
|
||||||
{
|
|
||||||
var component = root.GetComponent<T>();
|
|
||||||
if (component == null)
|
|
||||||
{
|
|
||||||
Debug.LogError($"Minesweeper screen bootstrap failed: '{ownerName}' is missing {typeof(T).Name}.");
|
|
||||||
}
|
|
||||||
|
|
||||||
return component;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static T RequireChildComponent<T>(Transform root, string path) where T : Component
|
|
||||||
{
|
|
||||||
var child = root.Find(path);
|
|
||||||
if (child == null)
|
|
||||||
{
|
|
||||||
Debug.LogError($"Minesweeper screen bootstrap failed: '{root.name}/{path}' was not found.");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
var component = child.GetComponent<T>();
|
|
||||||
if (component == null)
|
|
||||||
{
|
|
||||||
Debug.LogError($"Minesweeper screen bootstrap failed: '{root.name}/{path}' is missing {typeof(T).Name}.");
|
|
||||||
}
|
|
||||||
|
|
||||||
return component;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void Stretch(RectTransform rectTransform)
|
|
||||||
{
|
|
||||||
if (rectTransform == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
rectTransform.anchorMin = Vector2.zero;
|
|
||||||
rectTransform.anchorMax = Vector2.one;
|
|
||||||
rectTransform.offsetMin = Vector2.zero;
|
|
||||||
rectTransform.offsetMax = Vector2.zero;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 1c906a10872edd04480e534703fc4fea
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using Minesweeper.Core;
|
|
||||||
using Minesweeper.Presentation.Factories;
|
|
||||||
|
|
||||||
namespace Minesweeper.Presentation.Views
|
|
||||||
{
|
|
||||||
public interface IGameView : IView
|
|
||||||
{
|
|
||||||
event Action RestartRequested;
|
|
||||||
event Action GoToMenuRequested;
|
|
||||||
event Action PauseRequested;
|
|
||||||
event Action ResumeRequested;
|
|
||||||
event Action CellPressStarted;
|
|
||||||
event Action CellPressEnded;
|
|
||||||
event Action<int, int> CellOpenRequested;
|
|
||||||
event Action<int, int> CellFlagRequested;
|
|
||||||
|
|
||||||
void ShowGame();
|
|
||||||
void HideGame();
|
|
||||||
void ShowPause();
|
|
||||||
void HidePause();
|
|
||||||
void ShowResult(GameState state);
|
|
||||||
void HideResult();
|
|
||||||
void SetMineCount(int minesCount);
|
|
||||||
void SetTimer(float seconds);
|
|
||||||
void RebuildBoard(IReadOnlyList<BoardCellData> cells, int width, int height, ICellViewFactory cellViewFactory, bool revealUnflaggedMines);
|
|
||||||
void RefreshBoard(IReadOnlyList<BoardCellData> cells, bool revealUnflaggedMines);
|
|
||||||
void SetBoardInputEnabled(bool enabled);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: a8c5423ea37354a4e82b05aadfbf239f
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace Minesweeper.Presentation.Views
|
|
||||||
{
|
|
||||||
public interface IMainMenuView : IView
|
|
||||||
{
|
|
||||||
event Action StartClicked;
|
|
||||||
|
|
||||||
void Show();
|
|
||||||
void Hide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
using System;
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.UI;
|
|
||||||
|
|
||||||
namespace Minesweeper.Presentation.Views
|
|
||||||
{
|
|
||||||
public sealed class MainMenuView : MonoBehaviour, IMainMenuView
|
|
||||||
{
|
|
||||||
[SerializeField] private GameObject root;
|
|
||||||
[SerializeField] private Button startButton;
|
|
||||||
|
|
||||||
public event Action StartClicked;
|
|
||||||
|
|
||||||
private void Awake()
|
|
||||||
{
|
|
||||||
if (root == null)
|
|
||||||
{
|
|
||||||
root = gameObject;
|
|
||||||
}
|
|
||||||
|
|
||||||
AutoBind();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnEnable()
|
|
||||||
{
|
|
||||||
if (startButton != null)
|
|
||||||
{
|
|
||||||
startButton.onClick.AddListener(OnStartClicked);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnDisable()
|
|
||||||
{
|
|
||||||
if (startButton != null)
|
|
||||||
{
|
|
||||||
startButton.onClick.RemoveListener(OnStartClicked);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Show()
|
|
||||||
{
|
|
||||||
root.SetActive(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Hide()
|
|
||||||
{
|
|
||||||
root.SetActive(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnStartClicked()
|
|
||||||
{
|
|
||||||
StartClicked?.Invoke();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Bind(GameObject root, Button startButton)
|
|
||||||
{
|
|
||||||
this.root = root != null ? root : gameObject;
|
|
||||||
this.startButton = startButton;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void AutoBind()
|
|
||||||
{
|
|
||||||
if (startButton == null)
|
|
||||||
{
|
|
||||||
var startButtonTransform = transform.Find("StartButton");
|
|
||||||
if (startButtonTransform != null)
|
|
||||||
{
|
|
||||||
startButton = startButtonTransform.GetComponent<Button>();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
using TMPro;
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.UI;
|
|
||||||
|
|
||||||
namespace Minesweeper.Presentation.Views
|
|
||||||
{
|
|
||||||
public readonly struct MinesweeperScreenRefs
|
|
||||||
{
|
|
||||||
public MinesweeperScreenRefs(
|
|
||||||
MainMenuView mainMenuView,
|
|
||||||
RectTransform boardPanel,
|
|
||||||
GridLayoutGroup boardGrid,
|
|
||||||
GameObject pauseRoot,
|
|
||||||
Button pauseRestartButton,
|
|
||||||
Button pauseResumeButton,
|
|
||||||
Button pauseMainMenuButton,
|
|
||||||
GameObject resultRoot,
|
|
||||||
Button resultRestartButton,
|
|
||||||
Button resultMainMenuButton,
|
|
||||||
TMP_Text resultText)
|
|
||||||
{
|
|
||||||
MainMenuView = mainMenuView;
|
|
||||||
BoardPanel = boardPanel;
|
|
||||||
BoardGrid = boardGrid;
|
|
||||||
PauseRoot = pauseRoot;
|
|
||||||
PauseRestartButton = pauseRestartButton;
|
|
||||||
PauseResumeButton = pauseResumeButton;
|
|
||||||
PauseMainMenuButton = pauseMainMenuButton;
|
|
||||||
ResultRoot = resultRoot;
|
|
||||||
ResultRestartButton = resultRestartButton;
|
|
||||||
ResultMainMenuButton = resultMainMenuButton;
|
|
||||||
ResultText = resultText;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MainMenuView MainMenuView { get; }
|
|
||||||
public RectTransform BoardPanel { get; }
|
|
||||||
public GridLayoutGroup BoardGrid { get; }
|
|
||||||
public GameObject PauseRoot { get; }
|
|
||||||
public Button PauseRestartButton { get; }
|
|
||||||
public Button PauseResumeButton { get; }
|
|
||||||
public Button PauseMainMenuButton { get; }
|
|
||||||
public GameObject ResultRoot { get; }
|
|
||||||
public Button ResultRestartButton { get; }
|
|
||||||
public Button ResultMainMenuButton { get; }
|
|
||||||
public TMP_Text ResultText { get; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using Minesweeper.Core;
|
|
||||||
using Minesweeper.Presentation.Factories;
|
|
||||||
|
|
||||||
namespace Minesweeper.Presentation.Views
|
|
||||||
{
|
|
||||||
public sealed class NullGameView : IGameView
|
|
||||||
{
|
|
||||||
public event Action RestartRequested
|
|
||||||
{
|
|
||||||
add { }
|
|
||||||
remove { }
|
|
||||||
}
|
|
||||||
|
|
||||||
public event Action GoToMenuRequested
|
|
||||||
{
|
|
||||||
add { }
|
|
||||||
remove { }
|
|
||||||
}
|
|
||||||
|
|
||||||
public event Action PauseRequested
|
|
||||||
{
|
|
||||||
add { }
|
|
||||||
remove { }
|
|
||||||
}
|
|
||||||
|
|
||||||
public event Action ResumeRequested
|
|
||||||
{
|
|
||||||
add { }
|
|
||||||
remove { }
|
|
||||||
}
|
|
||||||
|
|
||||||
public event Action CellPressStarted
|
|
||||||
{
|
|
||||||
add { }
|
|
||||||
remove { }
|
|
||||||
}
|
|
||||||
|
|
||||||
public event Action CellPressEnded
|
|
||||||
{
|
|
||||||
add { }
|
|
||||||
remove { }
|
|
||||||
}
|
|
||||||
|
|
||||||
public event Action<int, int> CellOpenRequested
|
|
||||||
{
|
|
||||||
add { }
|
|
||||||
remove { }
|
|
||||||
}
|
|
||||||
|
|
||||||
public event Action<int, int> CellFlagRequested
|
|
||||||
{
|
|
||||||
add { }
|
|
||||||
remove { }
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ShowGame()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void HideGame()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ShowPause()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void HidePause()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ShowResult(GameState state)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void HideResult()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetMineCount(int minesCount)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetTimer(float seconds)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RebuildBoard(IReadOnlyList<BoardCellData> cells, int width, int height, ICellViewFactory cellViewFactory, bool revealUnflaggedMines)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RefreshBoard(IReadOnlyList<BoardCellData> cells, bool revealUnflaggedMines)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetBoardInputEnabled(bool enabled)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: c800a42df535f9347bea10f164fd2e15
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace Minesweeper.Presentation.Views
|
|
||||||
{
|
|
||||||
public sealed class NullMainMenuView : IMainMenuView
|
|
||||||
{
|
|
||||||
public event Action StartClicked
|
|
||||||
{
|
|
||||||
add { }
|
|
||||||
remove { }
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Show()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Hide()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -311,21 +311,6 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 1c906a10872edd04480e534703fc4fea, type: 3}
|
m_Script: {fileID: 11500000, guid: 1c906a10872edd04480e534703fc4fea, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier: Assembly-CSharp::Minesweeper.Presentation.Views.GameView
|
m_EditorClassIdentifier: Assembly-CSharp::Minesweeper.Presentation.Views.GameView
|
||||||
gameRoot: {fileID: 289057768}
|
|
||||||
pauseRoot: {fileID: 0}
|
|
||||||
resultRoot: {fileID: 0}
|
|
||||||
boardPanel: {fileID: 0}
|
|
||||||
gridLayoutGroup: {fileID: 0}
|
|
||||||
pauseButton: {fileID: 0}
|
|
||||||
restartButton: {fileID: 0}
|
|
||||||
resumeButton: {fileID: 0}
|
|
||||||
mainMenuButton: {fileID: 0}
|
|
||||||
resultRestartButton: {fileID: 0}
|
|
||||||
resultMainMenuButton: {fileID: 0}
|
|
||||||
resultText: {fileID: 0}
|
|
||||||
timerText: {fileID: 751542998}
|
|
||||||
mineText: {fileID: 805410199}
|
|
||||||
uiConfig: {fileID: 0}
|
|
||||||
--- !u!1 &519420028
|
--- !u!1 &519420028
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -547,28 +532,6 @@ Transform:
|
|||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!114 &751542998 stripped
|
|
||||||
MonoBehaviour:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 2799103337096245725, guid: 212298b6cdb61bb41bcf765ca9467ef2, type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 1980798338579462618}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 0}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
|
|
||||||
--- !u!114 &805410199 stripped
|
|
||||||
MonoBehaviour:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 823287330887192061, guid: 212298b6cdb61bb41bcf765ca9467ef2, type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 1980798338579462618}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 0}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier: Unity.TextMeshPro::TMPro.TextMeshProUGUI
|
|
||||||
--- !u!224 &1101876292 stripped
|
--- !u!224 &1101876292 stripped
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_CorrespondingSourceObject: {fileID: 3873756121358901088, guid: 212298b6cdb61bb41bcf765ca9467ef2, type: 3}
|
m_CorrespondingSourceObject: {fileID: 3873756121358901088, guid: 212298b6cdb61bb41bcf765ca9467ef2, type: 3}
|
||||||
@@ -620,15 +583,12 @@ MonoBehaviour:
|
|||||||
autoInjectGameObjects: []
|
autoInjectGameObjects: []
|
||||||
gameConfig: {fileID: 11400000, guid: 4c24a7c2a548eff4fb21fa4a4bf3e741, type: 2}
|
gameConfig: {fileID: 11400000, guid: 4c24a7c2a548eff4fb21fa4a4bf3e741, type: 2}
|
||||||
uiConfig: {fileID: 11400000, guid: c8b7785713c7c8b49b853f7e5028a4fa, type: 2}
|
uiConfig: {fileID: 11400000, guid: c8b7785713c7c8b49b853f7e5028a4fa, type: 2}
|
||||||
screenCatalog:
|
|
||||||
<MainMenuPanelPrefab>k__BackingField: {fileID: 7682962739562644362, guid: 66407cd7142d6a945b37ca8dc5e7c6b7, type: 3}
|
|
||||||
<BoardGridPrefab>k__BackingField: {fileID: 463985621338212375, guid: 91c5885a4fbe47540abf4bfd814a32d0, type: 3}
|
|
||||||
<PausePanelPrefab>k__BackingField: {fileID: 2814582388565546678, guid: ec358f6fec19e3b469f516bd1ade70cd, type: 3}
|
|
||||||
<ResultPanelPrefab>k__BackingField: {fileID: 6869455415096409219, guid: 73d5a09dc8885e64a8c20a68ea82c5dc, type: 3}
|
|
||||||
contentRoot: {fileID: 1373940536}
|
contentRoot: {fileID: 1373940536}
|
||||||
topPanelView: {fileID: 1101876296}
|
topPanelView: {fileID: 1101876296}
|
||||||
mainMenuView: {fileID: 0}
|
mainMenuViewPrefab: {fileID: 5456992800552396061, guid: 66407cd7142d6a945b37ca8dc5e7c6b7, type: 3}
|
||||||
gameView: {fileID: 289057772}
|
boardViewPrefab: {fileID: -4096144217532421454, guid: 91c5885a4fbe47540abf4bfd814a32d0, type: 3}
|
||||||
|
pauseViewPrefab: {fileID: 7010459690024596299, guid: ec358f6fec19e3b469f516bd1ade70cd, type: 3}
|
||||||
|
resultViewPrefab: {fileID: -2277025653673582644, guid: 73d5a09dc8885e64a8c20a68ea82c5dc, type: 3}
|
||||||
--- !u!4 &1287266282
|
--- !u!4 &1287266282
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
+15
-3
@@ -69,6 +69,7 @@ namespace Minesweeper.Commands
|
|||||||
}
|
}
|
||||||
|
|
||||||
var state = gameStateService.Current;
|
var state = gameStateService.Current;
|
||||||
|
var generatedOnThisCommand = false;
|
||||||
if (state != GameState.Preparing && state != GameState.Playing)
|
if (state != GameState.Preparing && state != GameState.Playing)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -85,6 +86,8 @@ namespace Minesweeper.Commands
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
generatedOnThisCommand = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var result = boardService.OpenCell(command.X, command.Y);
|
var result = boardService.OpenCell(command.X, command.Y);
|
||||||
@@ -106,7 +109,15 @@ namespace Minesweeper.Commands
|
|||||||
gameStateService.SetState(GameState.Playing);
|
gameStateService.SetState(GameState.Playing);
|
||||||
}
|
}
|
||||||
|
|
||||||
boardEcsSyncService.SyncBoard(boardService);
|
if (generatedOnThisCommand)
|
||||||
|
{
|
||||||
|
boardEcsSyncService.SyncBoard(boardService);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
boardEcsSyncService.SyncCells(result.ChangedCells, boardService);
|
||||||
|
}
|
||||||
|
|
||||||
boardEcsSyncService.SyncGameState(gameStateService.Current, boardService.IsGenerated);
|
boardEcsSyncService.SyncGameState(gameStateService.Current, boardService.IsGenerated);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -145,7 +156,7 @@ namespace Minesweeper.Commands
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
boardEcsSyncService.SyncBoard(boardService);
|
boardEcsSyncService.SyncCells(result.ChangedCells, boardService);
|
||||||
boardEcsSyncService.SyncGameState(gameStateService.Current, boardService.IsGenerated);
|
boardEcsSyncService.SyncGameState(gameStateService.Current, boardService.IsGenerated);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -197,7 +208,8 @@ namespace Minesweeper.Commands
|
|||||||
|
|
||||||
public void Handle(PauseCommand command)
|
public void Handle(PauseCommand command)
|
||||||
{
|
{
|
||||||
if (gameStateService.Current == GameState.Playing)
|
var state = gameStateService.Current;
|
||||||
|
if (state == GameState.Preparing || state == GameState.Playing)
|
||||||
{
|
{
|
||||||
pauseService.Pause();
|
pauseService.Pause();
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Minesweeper.Config
|
||||||
|
{
|
||||||
|
[CreateAssetMenu(fileName = "MinesweeperGameConfig", menuName = "Minesweeper/Game Config")]
|
||||||
|
public sealed class MinesweeperGameConfig : ScriptableObject
|
||||||
|
{
|
||||||
|
[field: SerializeField, Min(1)] public int MinSizeX { get; private set; } = 2;
|
||||||
|
[field: SerializeField, Min(1)] public int MaxSizeX { get; private set; } = 50;
|
||||||
|
[field: SerializeField, Min(1)] public int MinSizeY { get; private set; } = 2;
|
||||||
|
[field: SerializeField, Min(1)] public int MaxSizeY { get; private set; } = 50;
|
||||||
|
|
||||||
|
public bool IsValid => MinSizeX > 0 && MinSizeY > 0 && MaxSizeX >= MinSizeX && MaxSizeY >= MinSizeY && MaxSizeX * MaxSizeY > 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,19 +1,23 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Minesweeper.Core
|
namespace Minesweeper.Core
|
||||||
{
|
{
|
||||||
public readonly struct BoardActionResult
|
public readonly struct BoardActionResult
|
||||||
{
|
{
|
||||||
public BoardActionResult(bool changed, bool hitMine, bool won, bool invalid)
|
public BoardActionResult(bool changed, bool hitMine, bool won, bool invalid, IReadOnlyList<BoardCellData> changedCells = null)
|
||||||
{
|
{
|
||||||
Changed = changed;
|
Changed = changed;
|
||||||
HitMine = hitMine;
|
HitMine = hitMine;
|
||||||
Won = won;
|
Won = won;
|
||||||
Invalid = invalid;
|
Invalid = invalid;
|
||||||
|
ChangedCells = changedCells;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Changed { get; }
|
public bool Changed { get; }
|
||||||
public bool HitMine { get; }
|
public bool HitMine { get; }
|
||||||
public bool Won { get; }
|
public bool Won { get; }
|
||||||
public bool Invalid { get; }
|
public bool Invalid { get; }
|
||||||
|
public IReadOnlyList<BoardCellData> ChangedCells { get; }
|
||||||
|
|
||||||
public static BoardActionResult NoChange => new BoardActionResult(false, false, false, false);
|
public static BoardActionResult NoChange => new BoardActionResult(false, false, false, false);
|
||||||
public static BoardActionResult InvalidAction => new BoardActionResult(false, false, false, true);
|
public static BoardActionResult InvalidAction => new BoardActionResult(false, false, false, true);
|
||||||
@@ -1,22 +1,18 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Minesweeper.Config;
|
|
||||||
|
|
||||||
namespace Minesweeper.Core
|
namespace Minesweeper.Core
|
||||||
{
|
{
|
||||||
public sealed class BoardService : IBoardService
|
public sealed class BoardService : IBoardService
|
||||||
{
|
{
|
||||||
private const int DefaultWidth = 9;
|
private readonly IGameSettingsService settingsService;
|
||||||
private const int DefaultHeight = 9;
|
|
||||||
private const int DefaultMinesCount = 10;
|
|
||||||
|
|
||||||
private readonly MinesweeperGameConfig config;
|
|
||||||
private readonly Random random = new Random();
|
private readonly Random random = new Random();
|
||||||
|
private readonly List<BoardCellData> changedCells = new List<BoardCellData>();
|
||||||
private CellData[,] cells;
|
private CellData[,] cells;
|
||||||
|
|
||||||
public BoardService(MinesweeperGameConfig config)
|
public BoardService(IGameSettingsService settingsService)
|
||||||
{
|
{
|
||||||
this.config = config;
|
this.settingsService = settingsService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Width { get; private set; }
|
public int Width { get; private set; }
|
||||||
@@ -24,17 +20,19 @@ namespace Minesweeper.Core
|
|||||||
public int MinesCount { get; private set; }
|
public int MinesCount { get; private set; }
|
||||||
public bool IsGenerated { get; private set; }
|
public bool IsGenerated { get; private set; }
|
||||||
public int OpenedSafeCellsCount { get; private set; }
|
public int OpenedSafeCellsCount { get; private set; }
|
||||||
|
public int FlaggedCellsCount { get; private set; }
|
||||||
public int SafeCellsCount => Width * Height - MinesCount;
|
public int SafeCellsCount => Width * Height - MinesCount;
|
||||||
|
public IReadOnlyList<BoardCellData> LastChangedCells => changedCells;
|
||||||
|
|
||||||
public void InitializeEmptyBoard()
|
public void InitializeEmptyBoard()
|
||||||
{
|
{
|
||||||
ResolveConfig(out var width, out var height, out var minesCount);
|
Width = settingsService.SizeX;
|
||||||
|
Height = settingsService.SizeY;
|
||||||
Width = width;
|
MinesCount = Math.Min(settingsService.MinesCount, Width * Height - 1);
|
||||||
Height = height;
|
|
||||||
MinesCount = minesCount;
|
|
||||||
OpenedSafeCellsCount = 0;
|
OpenedSafeCellsCount = 0;
|
||||||
|
FlaggedCellsCount = 0;
|
||||||
IsGenerated = false;
|
IsGenerated = false;
|
||||||
|
changedCells.Clear();
|
||||||
cells = new CellData[Width, Height];
|
cells = new CellData[Width, Height];
|
||||||
|
|
||||||
for (var x = 0; x < Width; x++)
|
for (var x = 0; x < Width; x++)
|
||||||
@@ -65,6 +63,7 @@ namespace Minesweeper.Core
|
|||||||
public BoardActionResult OpenCell(int x, int y)
|
public BoardActionResult OpenCell(int x, int y)
|
||||||
{
|
{
|
||||||
EnsureInitialized();
|
EnsureInitialized();
|
||||||
|
changedCells.Clear();
|
||||||
|
|
||||||
if (!IsGenerated || !IsInside(x, y))
|
if (!IsGenerated || !IsInside(x, y))
|
||||||
{
|
{
|
||||||
@@ -80,7 +79,8 @@ namespace Minesweeper.Core
|
|||||||
if (cell.IsMine)
|
if (cell.IsMine)
|
||||||
{
|
{
|
||||||
cell.IsOpened = true;
|
cell.IsOpened = true;
|
||||||
return new BoardActionResult(true, true, false, false);
|
AddChangedCell(cell);
|
||||||
|
return new BoardActionResult(true, true, false, false, changedCells);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cell.NeighborMines == 0)
|
if (cell.NeighborMines == 0)
|
||||||
@@ -92,12 +92,13 @@ namespace Minesweeper.Core
|
|||||||
OpenSafeCell(cell);
|
OpenSafeCell(cell);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new BoardActionResult(true, false, IsWin(), false);
|
return new BoardActionResult(true, false, IsWin(), false, changedCells);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BoardActionResult ToggleFlag(int x, int y)
|
public BoardActionResult ToggleFlag(int x, int y)
|
||||||
{
|
{
|
||||||
EnsureInitialized();
|
EnsureInitialized();
|
||||||
|
changedCells.Clear();
|
||||||
|
|
||||||
if (!IsInside(x, y))
|
if (!IsInside(x, y))
|
||||||
{
|
{
|
||||||
@@ -110,8 +111,19 @@ namespace Minesweeper.Core
|
|||||||
return BoardActionResult.NoChange;
|
return BoardActionResult.NoChange;
|
||||||
}
|
}
|
||||||
|
|
||||||
cell.IsFlagged = !cell.IsFlagged;
|
if (cell.IsFlagged)
|
||||||
return new BoardActionResult(true, false, false, false);
|
{
|
||||||
|
cell.IsFlagged = false;
|
||||||
|
FlaggedCellsCount--;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cell.IsFlagged = true;
|
||||||
|
FlaggedCellsCount++;
|
||||||
|
}
|
||||||
|
|
||||||
|
AddChangedCell(cell);
|
||||||
|
return new BoardActionResult(true, false, false, false, changedCells);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsInside(int x, int y)
|
public bool IsInside(int x, int y)
|
||||||
@@ -147,20 +159,6 @@ namespace Minesweeper.Core
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ResolveConfig(out int width, out int height, out int minesCount)
|
|
||||||
{
|
|
||||||
width = config.Width;
|
|
||||||
height = config.Height;
|
|
||||||
minesCount = config.MinesCount;
|
|
||||||
|
|
||||||
if (width <= 0 || height <= 0 || minesCount <= 0 || minesCount >= width * height)
|
|
||||||
{
|
|
||||||
width = DefaultWidth;
|
|
||||||
height = DefaultHeight;
|
|
||||||
minesCount = DefaultMinesCount;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void EnsureInitialized()
|
private void EnsureInitialized()
|
||||||
{
|
{
|
||||||
if (cells == null)
|
if (cells == null)
|
||||||
@@ -253,12 +251,13 @@ namespace Minesweeper.Core
|
|||||||
while (queue.Count > 0)
|
while (queue.Count > 0)
|
||||||
{
|
{
|
||||||
var cell = queue.Dequeue();
|
var cell = queue.Dequeue();
|
||||||
if (visited[cell.X, cell.Y] || cell.IsMine || cell.IsFlagged)
|
if (visited[cell.X, cell.Y] || cell.IsMine)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
visited[cell.X, cell.Y] = true;
|
visited[cell.X, cell.Y] = true;
|
||||||
|
ClearFlag(cell);
|
||||||
OpenSafeCell(cell);
|
OpenSafeCell(cell);
|
||||||
|
|
||||||
if (cell.NeighborMines != 0)
|
if (cell.NeighborMines != 0)
|
||||||
@@ -276,7 +275,7 @@ namespace Minesweeper.Core
|
|||||||
}
|
}
|
||||||
|
|
||||||
var neighbor = cells[x, y];
|
var neighbor = cells[x, y];
|
||||||
if (!visited[x, y] && !neighbor.IsMine && !neighbor.IsFlagged && !neighbor.IsOpened)
|
if (!visited[x, y] && !neighbor.IsMine && !neighbor.IsOpened)
|
||||||
{
|
{
|
||||||
queue.Enqueue(neighbor);
|
queue.Enqueue(neighbor);
|
||||||
}
|
}
|
||||||
@@ -294,6 +293,23 @@ namespace Minesweeper.Core
|
|||||||
|
|
||||||
cell.IsOpened = true;
|
cell.IsOpened = true;
|
||||||
OpenedSafeCellsCount++;
|
OpenedSafeCellsCount++;
|
||||||
|
AddChangedCell(cell);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ClearFlag(CellData cell)
|
||||||
|
{
|
||||||
|
if (!cell.IsFlagged)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
cell.IsFlagged = false;
|
||||||
|
FlaggedCellsCount--;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddChangedCell(CellData cell)
|
||||||
|
{
|
||||||
|
changedCells.Add(ToData(cell));
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool IsWin()
|
private bool IsWin()
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
using Minesweeper.Config;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Minesweeper.Core
|
||||||
|
{
|
||||||
|
public sealed class GameSettingsService : IGameSettingsService
|
||||||
|
{
|
||||||
|
private const int MinimumMinesCount = 1;
|
||||||
|
|
||||||
|
private readonly MinesweeperGameConfig config;
|
||||||
|
private readonly IGameSettingsStorage storage;
|
||||||
|
private GameSettingsValue current;
|
||||||
|
|
||||||
|
public GameSettingsService(MinesweeperGameConfig config, IGameSettingsStorage storage)
|
||||||
|
{
|
||||||
|
this.config = config;
|
||||||
|
this.storage = storage;
|
||||||
|
current = LoadInitialSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int SizeX => current.SizeX;
|
||||||
|
public int SizeY => current.SizeY;
|
||||||
|
public int MinesCount => current.MinesCount;
|
||||||
|
public GameSettingsValue Current => current;
|
||||||
|
|
||||||
|
public GameSettingsValue Clamp(GameSettingsValue value)
|
||||||
|
{
|
||||||
|
var sizeX = Mathf.Clamp(value.SizeX, config.MinSizeX, config.MaxSizeX);
|
||||||
|
var sizeY = Mathf.Clamp(value.SizeY, config.MinSizeY, config.MaxSizeY);
|
||||||
|
EnsureAtLeastTwoCells(ref sizeX, ref sizeY);
|
||||||
|
|
||||||
|
var mines = Mathf.Clamp(value.MinesCount, MinimumMinesCount, GetMaxMines(sizeX, sizeY));
|
||||||
|
return new GameSettingsValue(sizeX, sizeY, mines);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool ApplyAndSaveIfChanged(GameSettingsValue value)
|
||||||
|
{
|
||||||
|
var clamped = Clamp(value);
|
||||||
|
if (current.Equals(clamped))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
current = clamped;
|
||||||
|
storage.Save(current);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int GetMaxMines(int sizeX, int sizeY)
|
||||||
|
{
|
||||||
|
return Mathf.Max(MinimumMinesCount, sizeX * sizeY - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
private GameSettingsValue LoadInitialSettings()
|
||||||
|
{
|
||||||
|
if (storage.TryLoad(out var saved))
|
||||||
|
{
|
||||||
|
return Clamp(saved);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Clamp(new GameSettingsValue(config.MinSizeX, config.MinSizeY, MinimumMinesCount));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void EnsureAtLeastTwoCells(ref int sizeX, ref int sizeY)
|
||||||
|
{
|
||||||
|
if (sizeX * sizeY > 1)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sizeX < config.MaxSizeX)
|
||||||
|
{
|
||||||
|
sizeX++;
|
||||||
|
}
|
||||||
|
else if (sizeY < config.MaxSizeY)
|
||||||
|
{
|
||||||
|
sizeY++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 38b7be3d055b5c34bbba9b36c0e11fc6
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
namespace Minesweeper.Core
|
||||||
|
{
|
||||||
|
public readonly struct GameSettingsValue
|
||||||
|
{
|
||||||
|
public GameSettingsValue(int sizeX, int sizeY, int minesCount)
|
||||||
|
{
|
||||||
|
SizeX = sizeX;
|
||||||
|
SizeY = sizeY;
|
||||||
|
MinesCount = minesCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int SizeX { get; }
|
||||||
|
public int SizeY { get; }
|
||||||
|
public int MinesCount { get; }
|
||||||
|
|
||||||
|
public bool Equals(GameSettingsValue other)
|
||||||
|
{
|
||||||
|
return SizeX == other.SizeX && SizeY == other.SizeY && MinesCount == other.MinesCount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5a48645a1753ceb4ba0401ec44d70070
|
||||||
@@ -9,7 +9,9 @@ namespace Minesweeper.Core
|
|||||||
int MinesCount { get; }
|
int MinesCount { get; }
|
||||||
bool IsGenerated { get; }
|
bool IsGenerated { get; }
|
||||||
int OpenedSafeCellsCount { get; }
|
int OpenedSafeCellsCount { get; }
|
||||||
|
int FlaggedCellsCount { get; }
|
||||||
int SafeCellsCount { get; }
|
int SafeCellsCount { get; }
|
||||||
|
IReadOnlyList<BoardCellData> LastChangedCells { get; }
|
||||||
|
|
||||||
void InitializeEmptyBoard();
|
void InitializeEmptyBoard();
|
||||||
bool GenerateAfterFirstClick(int safeX, int safeY);
|
bool GenerateAfterFirstClick(int safeX, int safeY);
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
namespace Minesweeper.Core
|
||||||
|
{
|
||||||
|
public interface IGameSettingsService
|
||||||
|
{
|
||||||
|
int SizeX { get; }
|
||||||
|
int SizeY { get; }
|
||||||
|
int MinesCount { get; }
|
||||||
|
GameSettingsValue Current { get; }
|
||||||
|
|
||||||
|
GameSettingsValue Clamp(GameSettingsValue value);
|
||||||
|
bool ApplyAndSaveIfChanged(GameSettingsValue value);
|
||||||
|
int GetMaxMines(int sizeX, int sizeY);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3dcff3a940f664b4b96722f28e46636d
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
namespace Minesweeper.Core
|
||||||
|
{
|
||||||
|
public interface IGameSettingsStorage
|
||||||
|
{
|
||||||
|
bool TryLoad(out GameSettingsValue value);
|
||||||
|
void Save(GameSettingsValue value);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 54d04c5398018bc418e1a2528c559d0a
|
||||||
@@ -0,0 +1,201 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using Minesweeper.Core;
|
||||||
|
using Minesweeper.ECS.Components;
|
||||||
|
using Unity.Collections;
|
||||||
|
using Unity.Entities;
|
||||||
|
|
||||||
|
namespace Minesweeper.ECS
|
||||||
|
{
|
||||||
|
public sealed class BoardEcsSyncService : IBoardEcsSyncService
|
||||||
|
{
|
||||||
|
private readonly Dictionary<int, Entity> cellsByIndex = new Dictionary<int, Entity>();
|
||||||
|
private int syncedWidth;
|
||||||
|
private int syncedHeight;
|
||||||
|
|
||||||
|
public void ClearBoard()
|
||||||
|
{
|
||||||
|
if (!TryGetEntityManager(out var entityManager))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ClearCells(entityManager);
|
||||||
|
cellsByIndex.Clear();
|
||||||
|
syncedWidth = 0;
|
||||||
|
syncedHeight = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SyncBoard(IBoardService boardService)
|
||||||
|
{
|
||||||
|
if (!TryGetEntityManager(out var entityManager))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (syncedWidth != boardService.Width || syncedHeight != boardService.Height || cellsByIndex.Count != boardService.Width * boardService.Height)
|
||||||
|
{
|
||||||
|
ClearCells(entityManager);
|
||||||
|
cellsByIndex.Clear();
|
||||||
|
syncedWidth = boardService.Width;
|
||||||
|
syncedHeight = boardService.Height;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ClearChangedTags(entityManager);
|
||||||
|
}
|
||||||
|
|
||||||
|
var boardEntity = GetOrCreateSingleton<BoardConfigComponent>(entityManager);
|
||||||
|
entityManager.SetComponentData(boardEntity, new BoardConfigComponent
|
||||||
|
{
|
||||||
|
Width = boardService.Width,
|
||||||
|
Height = boardService.Height,
|
||||||
|
MinesCount = boardService.MinesCount,
|
||||||
|
OpenedSafeCellsCount = boardService.OpenedSafeCellsCount,
|
||||||
|
FlaggedCellsCount = boardService.FlaggedCellsCount,
|
||||||
|
IsGenerated = ToByte(boardService.IsGenerated)
|
||||||
|
});
|
||||||
|
|
||||||
|
var archetype = entityManager.CreateArchetype(typeof(CellComponent));
|
||||||
|
var cells = boardService.GetCells();
|
||||||
|
for (var i = 0; i < cells.Count; i++)
|
||||||
|
{
|
||||||
|
var cell = cells[i];
|
||||||
|
var index = ToIndex(cell.X, cell.Y, boardService.Width);
|
||||||
|
if (!cellsByIndex.TryGetValue(index, out var entity) || !entityManager.Exists(entity))
|
||||||
|
{
|
||||||
|
entity = entityManager.CreateEntity(archetype);
|
||||||
|
cellsByIndex[index] = entity;
|
||||||
|
}
|
||||||
|
|
||||||
|
SetCell(entityManager, entity, cell, boardService.Width, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SyncCells(IReadOnlyList<BoardCellData> cells, IBoardService boardService)
|
||||||
|
{
|
||||||
|
if (cells == null || cells.Count == 0 || !TryGetEntityManager(out var entityManager))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var boardEntity = GetOrCreateSingleton<BoardConfigComponent>(entityManager);
|
||||||
|
entityManager.SetComponentData(boardEntity, new BoardConfigComponent
|
||||||
|
{
|
||||||
|
Width = boardService.Width,
|
||||||
|
Height = boardService.Height,
|
||||||
|
MinesCount = boardService.MinesCount,
|
||||||
|
OpenedSafeCellsCount = boardService.OpenedSafeCellsCount,
|
||||||
|
FlaggedCellsCount = boardService.FlaggedCellsCount,
|
||||||
|
IsGenerated = ToByte(boardService.IsGenerated)
|
||||||
|
});
|
||||||
|
|
||||||
|
ClearChangedTags(entityManager);
|
||||||
|
|
||||||
|
for (var i = 0; i < cells.Count; i++)
|
||||||
|
{
|
||||||
|
var cell = cells[i];
|
||||||
|
var index = ToIndex(cell.X, cell.Y, boardService.Width);
|
||||||
|
if (cellsByIndex.TryGetValue(index, out var entity) && entityManager.Exists(entity))
|
||||||
|
{
|
||||||
|
SetCell(entityManager, entity, cell, boardService.Width, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SyncGameState(GameState state, bool hasFirstClick)
|
||||||
|
{
|
||||||
|
if (!TryGetEntityManager(out var entityManager))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var stateEntity = GetOrCreateSingleton<GameStateComponent>(entityManager);
|
||||||
|
entityManager.SetComponentData(stateEntity, new GameStateComponent
|
||||||
|
{
|
||||||
|
State = state,
|
||||||
|
HasFirstClick = ToByte(hasFirstClick)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool TryGetEntityManager(out EntityManager entityManager)
|
||||||
|
{
|
||||||
|
var world = World.DefaultGameObjectInjectionWorld;
|
||||||
|
if (world == null || !world.IsCreated)
|
||||||
|
{
|
||||||
|
entityManager = default;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
entityManager = world.EntityManager;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void ClearCells(EntityManager entityManager)
|
||||||
|
{
|
||||||
|
var query = entityManager.CreateEntityQuery(typeof(CellComponent));
|
||||||
|
entityManager.DestroyEntity(query);
|
||||||
|
query.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void ClearChangedTags(EntityManager entityManager)
|
||||||
|
{
|
||||||
|
var query = entityManager.CreateEntityQuery(typeof(CellChangedTag));
|
||||||
|
entityManager.RemoveComponent<CellChangedTag>(query);
|
||||||
|
query.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void SetCell(EntityManager entityManager, Entity entity, BoardCellData cell, int width, bool markChanged)
|
||||||
|
{
|
||||||
|
entityManager.SetComponentData(entity, new CellComponent
|
||||||
|
{
|
||||||
|
X = cell.X,
|
||||||
|
Y = cell.Y,
|
||||||
|
Index = ToIndex(cell.X, cell.Y, width),
|
||||||
|
IsMine = ToByte(cell.IsMine),
|
||||||
|
IsOpened = ToByte(cell.IsOpened),
|
||||||
|
IsFlagged = ToByte(cell.IsFlagged),
|
||||||
|
NeighborMines = cell.NeighborMines
|
||||||
|
});
|
||||||
|
|
||||||
|
if (markChanged && !entityManager.HasComponent<CellChangedTag>(entity))
|
||||||
|
{
|
||||||
|
entityManager.AddComponent<CellChangedTag>(entity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static int ToIndex(int x, int y, int width)
|
||||||
|
{
|
||||||
|
return y * width + x;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Entity GetOrCreateSingleton<T>(EntityManager entityManager) where T : unmanaged, IComponentData
|
||||||
|
{
|
||||||
|
var query = entityManager.CreateEntityQuery(typeof(T));
|
||||||
|
Entity entity;
|
||||||
|
|
||||||
|
if (query.IsEmptyIgnoreFilter)
|
||||||
|
{
|
||||||
|
entity = entityManager.CreateEntity(typeof(T));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var entities = query.ToEntityArray(Allocator.Temp);
|
||||||
|
entity = entities[0];
|
||||||
|
for (var i = 1; i < entities.Length; i++)
|
||||||
|
{
|
||||||
|
entityManager.DestroyEntity(entities[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
entities.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
query.Dispose();
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static byte ToByte(bool value)
|
||||||
|
{
|
||||||
|
return value ? (byte)1 : (byte)0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+3
@@ -7,5 +7,8 @@ namespace Minesweeper.ECS.Components
|
|||||||
public int Width;
|
public int Width;
|
||||||
public int Height;
|
public int Height;
|
||||||
public int MinesCount;
|
public int MinesCount;
|
||||||
|
public int OpenedSafeCellsCount;
|
||||||
|
public int FlaggedCellsCount;
|
||||||
|
public byte IsGenerated;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
using Unity.Entities;
|
||||||
|
|
||||||
|
namespace Minesweeper.ECS.Components
|
||||||
|
{
|
||||||
|
public struct CellChangedTag : IComponentData
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5702c8f40c71e7444a70e7aa73d8a9db
|
||||||
+2
@@ -6,9 +6,11 @@ namespace Minesweeper.ECS.Components
|
|||||||
{
|
{
|
||||||
public int X;
|
public int X;
|
||||||
public int Y;
|
public int Y;
|
||||||
|
public int Index;
|
||||||
public byte IsMine;
|
public byte IsMine;
|
||||||
public byte IsOpened;
|
public byte IsOpened;
|
||||||
public byte IsFlagged;
|
public byte IsFlagged;
|
||||||
public int NeighborMines;
|
public int NeighborMines;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
+2
@@ -1,3 +1,4 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
using Minesweeper.Core;
|
using Minesweeper.Core;
|
||||||
|
|
||||||
namespace Minesweeper.ECS
|
namespace Minesweeper.ECS
|
||||||
@@ -6,6 +7,7 @@ namespace Minesweeper.ECS
|
|||||||
{
|
{
|
||||||
void ClearBoard();
|
void ClearBoard();
|
||||||
void SyncBoard(IBoardService boardService);
|
void SyncBoard(IBoardService boardService);
|
||||||
|
void SyncCells(IReadOnlyList<BoardCellData> cells, IBoardService boardService);
|
||||||
void SyncGameState(GameState state, bool hasFirstClick);
|
void SyncGameState(GameState state, bool hasFirstClick);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+36
-25
@@ -17,17 +17,20 @@ namespace Minesweeper.Infrastructure
|
|||||||
{
|
{
|
||||||
[SerializeField] private MinesweeperGameConfig gameConfig;
|
[SerializeField] private MinesweeperGameConfig gameConfig;
|
||||||
[SerializeField] private MinesweeperUiConfig uiConfig;
|
[SerializeField] private MinesweeperUiConfig uiConfig;
|
||||||
[SerializeField] private MinesweeperScreenCatalog screenCatalog = new MinesweeperScreenCatalog();
|
|
||||||
[SerializeField] private Transform contentRoot;
|
[SerializeField] private Transform contentRoot;
|
||||||
[SerializeField] private TopPanelView topPanelView;
|
[SerializeField] private TopPanelView topPanelView;
|
||||||
[SerializeField] private MainMenuView mainMenuView;
|
[SerializeField] private MainMenuView mainMenuViewPrefab;
|
||||||
[SerializeField] private GameView gameView;
|
[SerializeField] private BoardView boardViewPrefab;
|
||||||
|
[SerializeField] private PauseView pauseViewPrefab;
|
||||||
|
[SerializeField] private ResultView resultViewPrefab;
|
||||||
|
|
||||||
protected override void Configure(IContainerBuilder builder)
|
protected override void Configure(IContainerBuilder builder)
|
||||||
{
|
{
|
||||||
builder.RegisterInstance(GetConfig());
|
builder.RegisterInstance(GetConfig());
|
||||||
var resolvedUiConfig = GetUiConfig();
|
var resolvedUiConfig = GetUiConfig();
|
||||||
builder.RegisterInstance(resolvedUiConfig);
|
builder.RegisterInstance(resolvedUiConfig);
|
||||||
|
builder.Register<PlayerPrefsGameSettingsStorage>(Lifetime.Singleton).As<IGameSettingsStorage>();
|
||||||
|
builder.Register<GameSettingsService>(Lifetime.Singleton).As<IGameSettingsService>();
|
||||||
builder.Register<GameStateService>(Lifetime.Singleton).As<IGameStateService>();
|
builder.Register<GameStateService>(Lifetime.Singleton).As<IGameStateService>();
|
||||||
builder.Register<BoardService>(Lifetime.Singleton).As<IBoardService>();
|
builder.Register<BoardService>(Lifetime.Singleton).As<IBoardService>();
|
||||||
builder.Register<GamePauseService>(Lifetime.Singleton).As<IGamePauseService>();
|
builder.Register<GamePauseService>(Lifetime.Singleton).As<IGamePauseService>();
|
||||||
@@ -38,15 +41,6 @@ namespace Minesweeper.Infrastructure
|
|||||||
builder.Register<CellViewFactory>(Lifetime.Singleton).As<ICellViewFactory>();
|
builder.Register<CellViewFactory>(Lifetime.Singleton).As<ICellViewFactory>();
|
||||||
|
|
||||||
var screenRefs = SpawnScreens();
|
var screenRefs = SpawnScreens();
|
||||||
if (screenRefs.MainMenuView != null)
|
|
||||||
{
|
|
||||||
mainMenuView = screenRefs.MainMenuView;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (gameView != null && screenRefs.BoardPanel != null)
|
|
||||||
{
|
|
||||||
gameView.BindScreens(screenRefs);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (topPanelView != null)
|
if (topPanelView != null)
|
||||||
{
|
{
|
||||||
@@ -58,23 +52,41 @@ namespace Minesweeper.Infrastructure
|
|||||||
builder.Register<NullTopPanelView>(Lifetime.Singleton).As<ITopPanelView>();
|
builder.Register<NullTopPanelView>(Lifetime.Singleton).As<ITopPanelView>();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mainMenuView != null)
|
if (screenRefs.MainMenuView != null)
|
||||||
{
|
{
|
||||||
builder.RegisterComponent(mainMenuView).As<IMainMenuView>();
|
builder.RegisterComponent(screenRefs.MainMenuView).As<IMainMenuView>();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
builder.Register<NullMainMenuView>(Lifetime.Singleton).As<IMainMenuView>();
|
builder.Register<NullMainMenuView>(Lifetime.Singleton).As<IMainMenuView>();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gameView != null)
|
if (screenRefs.BoardView != null)
|
||||||
{
|
{
|
||||||
gameView.BindConfig(resolvedUiConfig);
|
screenRefs.BoardView.BindConfig(resolvedUiConfig);
|
||||||
builder.RegisterComponent(gameView).As<IGameView>();
|
builder.RegisterComponent(screenRefs.BoardView).As<IBoardView>();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
builder.Register<NullGameView>(Lifetime.Singleton).As<IGameView>();
|
builder.Register<NullBoardView>(Lifetime.Singleton).As<IBoardView>();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (screenRefs.PauseView != null)
|
||||||
|
{
|
||||||
|
builder.RegisterComponent(screenRefs.PauseView).As<IPauseView>();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
builder.Register<NullPauseView>(Lifetime.Singleton).As<IPauseView>();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (screenRefs.ResultView != null)
|
||||||
|
{
|
||||||
|
builder.RegisterComponent(screenRefs.ResultView).As<IResultView>();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
builder.Register<NullResultView>(Lifetime.Singleton).As<IResultView>();
|
||||||
}
|
}
|
||||||
|
|
||||||
builder.Register<SelectFieldCommandHandler>(Lifetime.Singleton);
|
builder.Register<SelectFieldCommandHandler>(Lifetime.Singleton);
|
||||||
@@ -86,7 +98,6 @@ namespace Minesweeper.Infrastructure
|
|||||||
builder.Register<ResumeCommandHandler>(Lifetime.Singleton);
|
builder.Register<ResumeCommandHandler>(Lifetime.Singleton);
|
||||||
builder.Register<GoToMenuCommandHandler>(Lifetime.Singleton);
|
builder.Register<GoToMenuCommandHandler>(Lifetime.Singleton);
|
||||||
builder.Register<GameCommandDispatcher>(Lifetime.Singleton).As<IGameCommandDispatcher>();
|
builder.Register<GameCommandDispatcher>(Lifetime.Singleton).As<IGameCommandDispatcher>();
|
||||||
builder.Register<RestartKeyInputService>(Lifetime.Singleton).As<ITickable>();
|
|
||||||
|
|
||||||
builder.Register<MainMenuPresenter>(Lifetime.Singleton);
|
builder.Register<MainMenuPresenter>(Lifetime.Singleton);
|
||||||
builder.Register<TopPanelPresenter>(Lifetime.Singleton);
|
builder.Register<TopPanelPresenter>(Lifetime.Singleton);
|
||||||
@@ -116,12 +127,12 @@ namespace Minesweeper.Infrastructure
|
|||||||
|
|
||||||
private MinesweeperScreenRefs SpawnScreens()
|
private MinesweeperScreenRefs SpawnScreens()
|
||||||
{
|
{
|
||||||
if (contentRoot == null || screenCatalog == null || !screenCatalog.IsValid)
|
return new MinesweeperScreenBootstrapper().Spawn(
|
||||||
{
|
contentRoot,
|
||||||
return default;
|
mainMenuViewPrefab,
|
||||||
}
|
boardViewPrefab,
|
||||||
|
pauseViewPrefab,
|
||||||
return new MinesweeperScreenBootstrapper().Spawn(contentRoot, screenCatalog);
|
resultViewPrefab);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
using Minesweeper.Core;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Minesweeper.Infrastructure
|
||||||
|
{
|
||||||
|
public sealed class PlayerPrefsGameSettingsStorage : IGameSettingsStorage
|
||||||
|
{
|
||||||
|
private const string SizeXKey = "Minesweeper.Settings.SizeX";
|
||||||
|
private const string SizeYKey = "Minesweeper.Settings.SizeY";
|
||||||
|
private const string MinesCountKey = "Minesweeper.Settings.MinesCount";
|
||||||
|
|
||||||
|
public bool TryLoad(out GameSettingsValue value)
|
||||||
|
{
|
||||||
|
if (!PlayerPrefs.HasKey(SizeXKey) || !PlayerPrefs.HasKey(SizeYKey) || !PlayerPrefs.HasKey(MinesCountKey))
|
||||||
|
{
|
||||||
|
value = default;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
value = new GameSettingsValue(PlayerPrefs.GetInt(SizeXKey), PlayerPrefs.GetInt(SizeYKey), PlayerPrefs.GetInt(MinesCountKey));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Save(GameSettingsValue value)
|
||||||
|
{
|
||||||
|
PlayerPrefs.SetInt(SizeXKey, value.SizeX);
|
||||||
|
PlayerPrefs.SetInt(SizeYKey, value.SizeY);
|
||||||
|
PlayerPrefs.SetInt(MinesCountKey, value.MinesCount);
|
||||||
|
PlayerPrefs.Save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a001fc2e924d95643a075190b6cadda1
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user