Рефакторинг панели ввода текста
This commit is contained in:
parent
6cdd058e27
commit
7f2ec29348
8
Assets/ControlElements.meta
Normal file
8
Assets/ControlElements.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 39f98fd2d4a99044e81ac55daced5460
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -11,6 +11,7 @@ GameObject:
|
||||
- component: {fileID: 4847867788462534487}
|
||||
- component: {fileID: 6526978814707206463}
|
||||
- component: {fileID: 8162617034424080788}
|
||||
- component: {fileID: 1956026621409659705}
|
||||
m_Layer: 5
|
||||
m_Name: LetterSlot
|
||||
m_TagString: Untagged
|
||||
@ -59,36 +60,41 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::LetterSlot
|
||||
_label: {fileID: 3629931500767060217}
|
||||
_image: {fileID: 0}
|
||||
_normalScale: 1
|
||||
_selectedScale: 1.1
|
||||
_animationSpeed: 10
|
||||
normalColor: {r: 0, g: 0.8117648, b: 0, a: 0.39215687}
|
||||
selectedColor: {r: 0, g: 0.8117648, b: 0, a: 1}
|
||||
_animationCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
_normalColor: {r: 0.4264151, g: 0.4264151, b: 0.4264151, a: 1}
|
||||
_selectedColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
_animationDuration: 0.2
|
||||
--- !u!114 &1956026621409659705
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6701869724969323775}
|
||||
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: 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!1 &7571868062296136469
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -156,8 +162,8 @@ MonoBehaviour:
|
||||
m_Calls: []
|
||||
m_text: 1
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 78d51b7df98de9942a628b514c730b60, type: 2}
|
||||
m_sharedMaterial: {fileID: 8799349529173042004, guid: 78d51b7df98de9942a628b514c730b60, type: 2}
|
||||
m_fontAsset: {fileID: 11400000, guid: e15a0ab6490ab964998a0786c208c4b2, type: 2}
|
||||
m_sharedMaterial: {fileID: 4262305343556741190, guid: e15a0ab6490ab964998a0786c208c4b2, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
@ -181,12 +187,12 @@ MonoBehaviour:
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 200
|
||||
m_fontSize: 115.7
|
||||
m_fontSizeBase: 200
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_enableAutoSizing: 1
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontSizeMax: 500
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
277
Assets/ControlElements/TextInput.prefab
Normal file
277
Assets/ControlElements/TextInput.prefab
Normal file
@ -0,0 +1,277 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &527443657731143411
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7001964560967241724}
|
||||
- component: {fileID: 2004804332165835788}
|
||||
- component: {fileID: 3508562339237642078}
|
||||
m_Layer: 5
|
||||
m_Name: Title
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7001964560967241724
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 527443657731143411}
|
||||
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: 4023223669698428946}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 130.68}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
--- !u!222 &2004804332165835788
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 527443657731143411}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &3508562339237642078
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 527443657731143411}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043D\u043E\u043C\u0435\u0440
|
||||
\u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430 \u0434\u043B\u044F \u0432\u044B\u0434\u0430\u0447\u0438
|
||||
qr-\u043F\u0440\u0438\u0437\u043E\u0432"
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 47e175ba6cb1126439b5583572a406fe, type: 2}
|
||||
m_sharedMaterial: {fileID: 8312110174854069929, guid: 47e175ba6cb1126439b5583572a406fe, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 40.15
|
||||
m_fontSizeBase: 40.15
|
||||
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: 1
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &1815018756682420252
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4023223669698428946}
|
||||
- component: {fileID: 871157203877245874}
|
||||
- component: {fileID: 2093239817457757221}
|
||||
- component: {fileID: 5157268599116440676}
|
||||
m_Layer: 5
|
||||
m_Name: TextInput
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4023223669698428946
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1815018756682420252}
|
||||
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: 7001964560967241724}
|
||||
- {fileID: 1609170722057679483}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: -500, y: -600}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &871157203877245874
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1815018756682420252}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2093239817457757221
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1815018756682420252}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0, g: 0, b: 0, 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: 1304898661, guid: bff7731f029e97345b55849f0e330c32, 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 &5157268599116440676
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1815018756682420252}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b978a8958dc9290419c3d1a666131860, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::TextInput
|
||||
_letterSlotPrefab: {fileID: 8162617034424080788, guid: 0b58754b4aeedff4f9eceafe35e9fff5, type: 3}
|
||||
_cellsRoot: {fileID: 1609170722057679483}
|
||||
switchSlotSound: {fileID: 0}
|
||||
switchLetterSound: {fileID: 0}
|
||||
acceptSound: {fileID: 0}
|
||||
openSound: {fileID: 0}
|
||||
alphabetString: 0123456789
|
||||
MaxSpeedLetterPerSecond: 8
|
||||
MinSpeedLetterPerSecond: 3
|
||||
MaxSpeedTime: 3
|
||||
MinSpeedTime: 0.5
|
||||
--- !u!1 &4081094104680176696
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1609170722057679483}
|
||||
m_Layer: 5
|
||||
m_Name: Cells root
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1609170722057679483
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4081094104680176696}
|
||||
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: 4023223669698428946}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0.5}
|
||||
m_AnchorMax: {x: 1, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: -100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
7
Assets/ControlElements/TextInput.prefab.meta
Normal file
7
Assets/ControlElements/TextInput.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dc7d2a24b5df54040b311e8c0c43261e
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/PrizesConfigurator.meta
Normal file
8
Assets/PrizesConfigurator.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1ae589696a9d9c6479df989df0f60763
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
77
Assets/PrizesConfigurator.prefab
Normal file
77
Assets/PrizesConfigurator.prefab
Normal file
@ -0,0 +1,77 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &5423109734219761443
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4098477273951441249}
|
||||
- component: {fileID: 7813772422055777004}
|
||||
- component: {fileID: 6451366207068483882}
|
||||
m_Layer: 5
|
||||
m_Name: PrizesConfigurator
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4098477273951441249
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5423109734219761443}
|
||||
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: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7813772422055777004
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5423109734219761443}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &6451366207068483882
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5423109734219761443}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.03396219, g: 0.03396219, b: 0.03396219, a: 0.9019608}
|
||||
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: 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
|
||||
7
Assets/PrizesConfigurator.prefab.meta
Normal file
7
Assets/PrizesConfigurator.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dcef42dd0beb95f4e9b230192966f091
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
15
Assets/PrizesConfigurator/PrizesConfigurator.cs
Normal file
15
Assets/PrizesConfigurator/PrizesConfigurator.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using CharacterSystem;
|
||||
using UnityEngine;
|
||||
|
||||
public class PrizesConfigurator : MonoBehaviour
|
||||
{
|
||||
|
||||
[SerializeField] CharacterSelectionPanel characterSelectionPanel;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
2
Assets/PrizesConfigurator/PrizesConfigurator.cs.meta
Normal file
2
Assets/PrizesConfigurator/PrizesConfigurator.cs.meta
Normal file
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a25be13eef5c7ad4aba12e2f6fd4cbef
|
||||
File diff suppressed because it is too large
Load Diff
@ -119,97 +119,6 @@ NavMeshSettings:
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &12287430
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 12287432}
|
||||
- component: {fileID: 12287431}
|
||||
m_Layer: 0
|
||||
m_Name: modes_3.1
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!212 &12287431
|
||||
SpriteRenderer:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 12287430}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_ForceMeshLod: -1
|
||||
m_MeshLodSelectionBias: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 163b0d467b865444bbeab1c309c1179d, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: 21300000, guid: 39ce5a75885e64d4fb9e9f6ffb57a290, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 7.88, y: 10.45}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!4 &12287432
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 12287430}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 1, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &22561141
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -360,6 +269,41 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 55709630}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &160899051
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 160899052}
|
||||
m_Layer: 5
|
||||
m_Name: CharacterSelection
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &160899052
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 160899051}
|
||||
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: 738214119}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &200561868
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -540,97 +484,6 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 260699711}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &405481578
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 405481580}
|
||||
- component: {fileID: 405481579}
|
||||
m_Layer: 0
|
||||
m_Name: modes_3
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!212 &405481579
|
||||
SpriteRenderer:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 405481578}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_ForceMeshLod: -1
|
||||
m_MeshLodSelectionBias: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 163b0d467b865444bbeab1c309c1179d, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: 21300000, guid: 39ce5a75885e64d4fb9e9f6ffb57a290, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 7.88, y: 10.45}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!4 &405481580
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 405481578}
|
||||
serializedVersion: 2
|
||||
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: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &417024831
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1010,6 +863,7 @@ GameObject:
|
||||
- component: {fileID: 662908343}
|
||||
- component: {fileID: 662908342}
|
||||
- component: {fileID: 662908341}
|
||||
- component: {fileID: 662908344}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
@ -1091,6 +945,126 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &662908344
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 662908340}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Runtime::UnityEngine.Rendering.Universal.UniversalAdditionalCameraData
|
||||
m_RenderShadows: 1
|
||||
m_RequiresDepthTextureOption: 2
|
||||
m_RequiresOpaqueTextureOption: 2
|
||||
m_CameraType: 0
|
||||
m_Cameras: []
|
||||
m_RendererIndex: -1
|
||||
m_VolumeLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 1
|
||||
m_VolumeTrigger: {fileID: 0}
|
||||
m_VolumeFrameworkUpdateModeOption: 2
|
||||
m_RenderPostProcessing: 0
|
||||
m_Antialiasing: 0
|
||||
m_AntialiasingQuality: 2
|
||||
m_StopNaN: 0
|
||||
m_Dithering: 0
|
||||
m_ClearDepth: 1
|
||||
m_AllowXRRendering: 1
|
||||
m_AllowHDROutput: 1
|
||||
m_UseScreenCoordOverride: 0
|
||||
m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_RequiresDepthTexture: 0
|
||||
m_RequiresColorTexture: 0
|
||||
m_TaaSettings:
|
||||
m_Quality: 3
|
||||
m_FrameInfluence: 0.1
|
||||
m_JitterScale: 1
|
||||
m_MipBias: 0
|
||||
m_VarianceClampScale: 0.9
|
||||
m_ContrastAdaptiveSharpening: 0
|
||||
m_Version: 2
|
||||
--- !u!1 &738214118
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 738214119}
|
||||
- component: {fileID: 738214121}
|
||||
- component: {fileID: 738214120}
|
||||
m_Layer: 5
|
||||
m_Name: PrizesConfigurator
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &738214119
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 738214118}
|
||||
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: 160899052}
|
||||
m_Father: {fileID: 1811081731}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: -400, y: -200}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &738214120
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 738214118}
|
||||
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: 0.392}
|
||||
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: 10907, guid: 0000000000000000f000000000000000, type: 0}
|
||||
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!222 &738214121
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 738214118}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &844375543
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1166,97 +1140,6 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 844375543}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &865061049
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 865061051}
|
||||
- component: {fileID: 865061050}
|
||||
m_Layer: 0
|
||||
m_Name: modes_3.4
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!212 &865061050
|
||||
SpriteRenderer:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 865061049}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_ForceMeshLod: -1
|
||||
m_MeshLodSelectionBias: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 163b0d467b865444bbeab1c309c1179d, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: 21300000, guid: 39ce5a75885e64d4fb9e9f6ffb57a290, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 7.88, y: 10.45}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!4 &865061051
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 865061049}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 1, y: 1, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &881374037
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1707,188 +1590,6 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1083898848}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1155930433
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1155930435}
|
||||
- component: {fileID: 1155930434}
|
||||
m_Layer: 0
|
||||
m_Name: modes_3.2
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!212 &1155930434
|
||||
SpriteRenderer:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1155930433}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_ForceMeshLod: -1
|
||||
m_MeshLodSelectionBias: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 163b0d467b865444bbeab1c309c1179d, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: 21300000, guid: 39ce5a75885e64d4fb9e9f6ffb57a290, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 7.88, y: 10.45}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!4 &1155930435
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1155930433}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 2, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1270003621
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1270003623}
|
||||
- component: {fileID: 1270003622}
|
||||
m_Layer: 0
|
||||
m_Name: modes_3.3
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!212 &1270003622
|
||||
SpriteRenderer:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1270003621}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_ForceMeshLod: -1
|
||||
m_MeshLodSelectionBias: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 163b0d467b865444bbeab1c309c1179d, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: 21300000, guid: 39ce5a75885e64d4fb9e9f6ffb57a290, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 7.88, y: 10.45}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!4 &1270003623
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1270003621}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1494753976
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -2189,97 +1890,6 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1715042286}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1738205478
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1738205480}
|
||||
- component: {fileID: 1738205479}
|
||||
m_Layer: 0
|
||||
m_Name: modes_3.5
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!212 &1738205479
|
||||
SpriteRenderer:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1738205478}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_ForceMeshLod: -1
|
||||
m_MeshLodSelectionBias: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 163b0d467b865444bbeab1c309c1179d, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: 21300000, guid: 39ce5a75885e64d4fb9e9f6ffb57a290, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 7.88, y: 10.45}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!4 &1738205480
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1738205478}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 2, y: 1, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1744879545
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -2355,6 +1965,109 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1744879545}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1811081727
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1811081731}
|
||||
- component: {fileID: 1811081730}
|
||||
- component: {fileID: 1811081729}
|
||||
- component: {fileID: 1811081728}
|
||||
m_Layer: 5
|
||||
m_Name: Canvas
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1811081728
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1811081727}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.GraphicRaycaster
|
||||
m_IgnoreReversedGraphics: 1
|
||||
m_BlockingObjects: 0
|
||||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
--- !u!114 &1811081729
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1811081727}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.CanvasScaler
|
||||
m_UiScaleMode: 0
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 800, y: 600}
|
||||
m_ScreenMatchMode: 0
|
||||
m_MatchWidthOrHeight: 0
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
m_PresetInfoIsWorld: 0
|
||||
--- !u!223 &1811081730
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1811081727}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 0
|
||||
m_Camera: {fileID: 0}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_VertexColorAlwaysGammaSpace: 0
|
||||
m_UseReflectionProbes: 0
|
||||
m_AdditionalShaderChannelsFlag: 0
|
||||
m_UpdateRectTransformForStandalone: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
--- !u!224 &1811081731
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1811081727}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 738214119}
|
||||
m_Father: {fileID: 0}
|
||||
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: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!1 &1847081692
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -2722,9 +2435,4 @@ SceneRoots:
|
||||
- {fileID: 662908343}
|
||||
- {fileID: 200561872}
|
||||
- {fileID: 453844752}
|
||||
- {fileID: 405481580}
|
||||
- {fileID: 1270003623}
|
||||
- {fileID: 12287432}
|
||||
- {fileID: 865061051}
|
||||
- {fileID: 1155930435}
|
||||
- {fileID: 1738205480}
|
||||
- {fileID: 1811081731}
|
||||
|
||||
@ -1,59 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class EnterNameState : IState
|
||||
{
|
||||
TextInput textInput;
|
||||
GameManager gm;
|
||||
PlayerStatsRecord record;
|
||||
|
||||
private string name;
|
||||
public void enter()
|
||||
{
|
||||
gm = GameManager.Instance;
|
||||
|
||||
textInput = gm.nameInput;
|
||||
textInput.gameObject.SetActive(true);
|
||||
textInput.Initialize();
|
||||
}
|
||||
|
||||
public void exit()
|
||||
{
|
||||
|
||||
textInput.gameObject.SetActive(false);
|
||||
|
||||
//вот тут получаем время и ходы.надо их считать
|
||||
|
||||
|
||||
gm.StatsService.AddRecord(record);
|
||||
//Тут же запись в бд будет
|
||||
}
|
||||
|
||||
public void update()
|
||||
{
|
||||
int discreteDir = 0;
|
||||
if (In.GetButtonDown(InSignal.left1)) discreteDir -= 1;
|
||||
if (In.GetButtonDown(InSignal.right1)) discreteDir += 1;
|
||||
|
||||
int continiousDir = 0;
|
||||
if (In.GetButton(InSignal.left2)) continiousDir -= 1;
|
||||
if (In.GetButton(InSignal.right2)) continiousDir += 1;
|
||||
|
||||
textInput.SwitchSlot(discreteDir);
|
||||
textInput.SwitchLetter(continiousDir);
|
||||
|
||||
if (In.GetButtonDownAnyPlayer(PlayerAction.down))
|
||||
{
|
||||
//name = textInput.AcceptAndClose();
|
||||
|
||||
//формирование записи
|
||||
int time = (int)gm.vsBotThinkTime;
|
||||
int moves = gm.vsBotMoves;
|
||||
Debug.Log($"Записываю {name} {time} {moves}");
|
||||
record = new PlayerStatsRecord(name, time, moves);
|
||||
|
||||
gm.stateMachine.ChangeState(new LeaderboardState(record));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 76ae6da5627528747b1ff30171509c97
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,51 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class EnterNumberTech : IState
|
||||
{
|
||||
TextInput textInput;
|
||||
GameManager gm;
|
||||
IState prevState;
|
||||
|
||||
public EnterNumberTech(IState prevState)
|
||||
{
|
||||
this.prevState = prevState;
|
||||
}
|
||||
|
||||
//private string name;
|
||||
public void enter()
|
||||
{
|
||||
gm = GameManager.Instance;
|
||||
|
||||
textInput = gm.NumberTech;
|
||||
textInput.gameObject.SetActive(true);
|
||||
textInput.Initialize();
|
||||
}
|
||||
|
||||
public void exit() => textInput.gameObject.SetActive(false);
|
||||
|
||||
public void update()
|
||||
{
|
||||
int discreteDir = 0;
|
||||
if (In.GetButtonDown(InSignal.left1)) discreteDir -= 1;
|
||||
if (In.GetButtonDown(InSignal.right1)) discreteDir += 1;
|
||||
|
||||
int continiousDir = 0;
|
||||
if (In.GetButton(InSignal.left2)) continiousDir -= 1;
|
||||
if (In.GetButton(InSignal.right2)) continiousDir += 1;
|
||||
|
||||
textInput.SwitchSlot(discreteDir);
|
||||
textInput.SwitchLetter(continiousDir);
|
||||
|
||||
if (In.GetButtonDownAnyPlayer(PlayerAction.down))
|
||||
{
|
||||
//PlayerPrefs.SetString("Price", textInput.AcceptAndClose());
|
||||
|
||||
//переход
|
||||
//gm.stateMachine.ChangeState(new SettingsState());
|
||||
gm.stateMachine.ChangeState(prevState);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dc2708ff75a80f5429c7623fcb90fa67
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,51 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class EnterValutaNameState : IState
|
||||
{
|
||||
TextInput textInput;
|
||||
GameManager gm;
|
||||
IState prevState;
|
||||
|
||||
public EnterValutaNameState(IState prevState)
|
||||
{
|
||||
this.prevState = prevState;
|
||||
}
|
||||
|
||||
//private string name;
|
||||
public void enter()
|
||||
{
|
||||
gm = GameManager.Instance;
|
||||
|
||||
textInput = gm.ValutaNameInput;
|
||||
textInput.gameObject.SetActive(true);
|
||||
textInput.Initialize();
|
||||
}
|
||||
|
||||
public void exit() => textInput.gameObject.SetActive(false);
|
||||
|
||||
public void update()
|
||||
{
|
||||
int discreteDir = 0;
|
||||
if (In.GetButtonDown(InSignal.left1)) discreteDir -= 1;
|
||||
if (In.GetButtonDown(InSignal.right1)) discreteDir += 1;
|
||||
|
||||
int continiousDir = 0;
|
||||
if (In.GetButton(InSignal.left2)) continiousDir -= 1;
|
||||
if (In.GetButton(InSignal.right2)) continiousDir += 1;
|
||||
|
||||
textInput.SwitchSlot(discreteDir);
|
||||
textInput.SwitchLetter(continiousDir);
|
||||
|
||||
if (In.GetButtonDownAnyPlayer(PlayerAction.down))
|
||||
{
|
||||
//PlayerPrefs.SetString("Price", textInput.AcceptAndClose());
|
||||
|
||||
//переход
|
||||
//gm.stateMachine.ChangeState(new SettingsState());
|
||||
gm.stateMachine.ChangeState(prevState);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e5dc2a7325896f04985fb75c94e405d0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,167 +0,0 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class GetNumberState : IState
|
||||
{
|
||||
IState prevState;
|
||||
const string NUMBER_KEY = "Number";
|
||||
GameObject entryPanel;
|
||||
Color normalColor = Color.gray;
|
||||
Color highlightedColor = new Color(0.7f, 0.7f, 0.7f, 1);
|
||||
|
||||
string[] digits = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9",};
|
||||
int currentDigitIndex;
|
||||
|
||||
|
||||
Image[] slots;
|
||||
|
||||
private int currentSlotIndex = 0;
|
||||
private int length = 11;
|
||||
|
||||
public GetNumberState(IState prevState)
|
||||
{
|
||||
this.prevState = prevState;
|
||||
}
|
||||
|
||||
public void enter()
|
||||
{
|
||||
//включить панель, получить доступ ко всем слотам
|
||||
entryPanel = GameManager.Instance.NumberPanel;
|
||||
Debug.Log(entryPanel);
|
||||
entryPanel.SetActive(true);
|
||||
collectSlots();
|
||||
|
||||
//подгрузить данные если были
|
||||
string currentNumber = getCurrentNumberOrNull();
|
||||
if (currentNumber != null) fillNumber(currentNumber);
|
||||
|
||||
currentDigitIndex = getDigitIndex(text(currentSlotIndex).text);
|
||||
if (currentDigitIndex == -1) currentDigitIndex = 0;
|
||||
|
||||
|
||||
switchSlot(1); switchSlot(-1);//чтобы отобразилась подсветка
|
||||
colorSlots();
|
||||
}
|
||||
|
||||
public void update()
|
||||
{
|
||||
|
||||
//Меняем слот
|
||||
if (In.GetButtonDown(InSignal.left1))
|
||||
{
|
||||
switchSlot(-1);
|
||||
}
|
||||
if (In.GetButtonDown(InSignal.right1))
|
||||
{
|
||||
switchSlot(1);
|
||||
}
|
||||
|
||||
|
||||
//меняем букву в слоте
|
||||
if (In.GetButtonDown(InSignal.left2))
|
||||
{
|
||||
switchDigit(-1);
|
||||
}
|
||||
if (In.GetButtonDown(InSignal.right2))
|
||||
{
|
||||
switchDigit(1);
|
||||
}
|
||||
|
||||
//записываем и выходим
|
||||
if (In.GetButtonDown(InSignal.down2))
|
||||
{
|
||||
//GameManager.instance.stateMachine.ChangeState(new SettingsState());
|
||||
GameManager.Instance.stateMachine.ChangeState(prevState);
|
||||
}
|
||||
|
||||
}
|
||||
public void exit()
|
||||
{
|
||||
//сохранить данные закрыть панельку
|
||||
string res = collectResult();
|
||||
PlayerPrefs.SetString(NUMBER_KEY, res);
|
||||
entryPanel.SetActive(false);
|
||||
}
|
||||
|
||||
|
||||
private void collectSlots()
|
||||
{
|
||||
slots = new Image[length];
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
slots[i] = entryPanel.transform.GetChild(i).GetComponent<Image>();
|
||||
}
|
||||
}
|
||||
private TextMeshProUGUI text(int index)
|
||||
{
|
||||
return slots[index].transform.GetChild(0).GetComponent<TextMeshProUGUI>();
|
||||
}
|
||||
|
||||
private string getCurrentNumberOrNull()
|
||||
{
|
||||
if (PlayerPrefs.HasKey(NUMBER_KEY))
|
||||
{
|
||||
return PlayerPrefs.GetString(NUMBER_KEY);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private void fillNumber(string number)
|
||||
{
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
text(i).text = number[i].ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private void switchSlot(int direction)
|
||||
{
|
||||
//старый слот не подсвечиваем
|
||||
slots[currentSlotIndex].color = normalColor;
|
||||
|
||||
//циклично перемещаем индекс
|
||||
direction = (int)Mathf.Sign(direction);
|
||||
currentSlotIndex = (currentSlotIndex + direction + length) % length;
|
||||
|
||||
//новый слот подсвечиваем
|
||||
slots[currentSlotIndex].color = highlightedColor;
|
||||
currentDigitIndex = getDigitIndex(text(currentSlotIndex).text);
|
||||
|
||||
//??все?
|
||||
}
|
||||
|
||||
private void switchDigit(int direction)
|
||||
{
|
||||
direction = (int)Mathf.Sign(direction);
|
||||
currentDigitIndex = (currentDigitIndex + digits.Length + direction) % digits.Length;
|
||||
|
||||
text(currentSlotIndex).text = digits[currentDigitIndex];
|
||||
}
|
||||
|
||||
private int getDigitIndex(string symbol) => Array.IndexOf(digits, symbol);
|
||||
|
||||
private string collectResult()
|
||||
{
|
||||
StringBuilder sb = new();
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
sb.Append(text(i).text);
|
||||
}
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
void colorSlots()
|
||||
{
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
slots[i].color = normalColor;
|
||||
}
|
||||
slots[0].color = highlightedColor;
|
||||
}
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a0196044027b4f148b06c8587dc50561
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -40,7 +40,7 @@ public class VictoryState : IState
|
||||
{
|
||||
//победили ботов
|
||||
//scale = gameManager.botScale;
|
||||
nextState = new VictoryVideoState(new EnterNameState());
|
||||
//nextState = new VictoryVideoState(new EnterNameState());
|
||||
}
|
||||
|
||||
////вкл анимацию приза
|
||||
|
||||
@ -34,7 +34,6 @@ namespace PrizeSystem
|
||||
{
|
||||
if (prize is QrPrize qr)
|
||||
{
|
||||
rank = qr.Rank;
|
||||
textInput.SetText(qr.PrizeText);
|
||||
DisplayRank();
|
||||
}
|
||||
@ -92,7 +91,7 @@ namespace PrizeSystem
|
||||
}
|
||||
}
|
||||
|
||||
public override Prize GetPrize() => PrizeUtils.CreatePrize(rank, textInput.GetText());
|
||||
public override Prize GetPrize() => PrizeUtils.CreatePrize(textInput.GetText());
|
||||
|
||||
public override void Tick() { }
|
||||
private void DisplayRank()
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
namespace PrizeSystem
|
||||
namespace PrizeSystem
|
||||
{
|
||||
public static class PrizeUtils
|
||||
{
|
||||
@ -6,21 +6,21 @@ namespace PrizeSystem
|
||||
{
|
||||
return prizeType switch
|
||||
{
|
||||
PrizeType.None => "Áåç ïðèçà",
|
||||
PrizeType.Hopper => "Õîïïåð 1",
|
||||
PrizeType.Hopper2 => "Õîïïåð 2",
|
||||
PrizeType.Ticket => "Áèëåò",
|
||||
PrizeType.Qr => "QR/Ñóïåðïðèç",
|
||||
PrizeType.Marbles => "Ìàðáëñ",
|
||||
PrizeType.VitrinaBox => "Âèòðèíà",
|
||||
_ => "Áåç ïðèçà"
|
||||
PrizeType.None => "Без приза",
|
||||
PrizeType.Hopper => "Хоппер 1",
|
||||
PrizeType.Hopper2 => "Хоппер 2",
|
||||
PrizeType.Ticket => "Билет",
|
||||
PrizeType.Qr => "QR/Суперприз",
|
||||
PrizeType.Marbles => "Марблс",
|
||||
PrizeType.VitrinaBox => "Витрина",
|
||||
_ => "Без приза"
|
||||
};
|
||||
}
|
||||
|
||||
public static Prize CreatePrize() => new EmptyPrize();
|
||||
public static Prize CreatePrize(CountablePrizeType prizeType, int Amount) => new CountablePrize(prizeType, Amount);
|
||||
public static Prize CreatePrize(int[] boxes) => new VitrinaPrize(boxes);
|
||||
public static Prize CreatePrize(int rank, string prizeText) => new QrPrize(rank, prizeText);
|
||||
public static Prize CreatePrize(string prizeText) => new QrPrize(prizeText);
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,13 +1,11 @@
|
||||
namespace PrizeSystem
|
||||
namespace PrizeSystem
|
||||
{
|
||||
public class QrPrize : Prize
|
||||
{
|
||||
public int Rank { get; }
|
||||
public string PrizeText { get; }
|
||||
public override string Body => $"Qr:{Rank},{PrizeText}";
|
||||
public QrPrize(int rank, string prizeText) : base(PrizeType.Qr)
|
||||
public override string Body => $"Qr:{PrizeText}";
|
||||
public QrPrize(string prizeText) : base(PrizeType.Qr)
|
||||
{
|
||||
Rank = rank;
|
||||
PrizeText = prizeText;
|
||||
}
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ namespace PrizeSystem
|
||||
int rank = int.Parse(entries[0]);
|
||||
string text = entries[1];
|
||||
|
||||
prizes.Add(PrizeUtils.CreatePrize(rank, text));
|
||||
prizes.Add(PrizeUtils.CreatePrize(text));
|
||||
}
|
||||
else
|
||||
{//считаемый приз
|
||||
@ -129,7 +129,7 @@ namespace PrizeSystem
|
||||
{
|
||||
prizes.Add(PrizeUtils.CreatePrize());
|
||||
}
|
||||
prizes.Add(PrizeUtils.CreatePrize(3, "5000 руб."));
|
||||
prizes.Add(PrizeUtils.CreatePrize("5000 руб."));
|
||||
|
||||
SerializePrizes(prizes);
|
||||
|
||||
|
||||
@ -1,38 +0,0 @@
|
||||
using PrizeSystem;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
public class SpecialPrizeView : MonoBehaviour
|
||||
{
|
||||
[SerializeField] CanvasGroup canvasGroup;
|
||||
[SerializeField] private TextMeshProUGUI PrizeText;
|
||||
|
||||
public void Init()
|
||||
{
|
||||
Refresh(PrizeSystemManager.cachedPrizes);
|
||||
PrizeSystemManager.PrizesChanged += Refresh;
|
||||
}
|
||||
|
||||
private void OnDestroy() => PrizeSystemManager.PrizesChanged -= Refresh;
|
||||
|
||||
private void Refresh(List<Prize> prizes)
|
||||
{
|
||||
var qrPrizes = prizes.OfType<QrPrize>().ToList();
|
||||
|
||||
bool prizing = SettingsManager.GetBool(SettingKey.PRIZING);
|
||||
bool hasQrPrizes = qrPrizes.Count > 0;
|
||||
bool needToDisplay = prizing && hasQrPrizes;
|
||||
|
||||
if (needToDisplay) PrizeText.text = GetMostRankedPrize(qrPrizes).PrizeText;
|
||||
canvasGroup.alpha = needToDisplay ? 1 : 0;
|
||||
}
|
||||
|
||||
private QrPrize GetMostRankedPrize(List<QrPrize> qrPrizes) //это можно в призовую систему перегнать или в утильку
|
||||
{
|
||||
if (qrPrizes == null || qrPrizes.Count == 0)
|
||||
return null;
|
||||
return qrPrizes.OrderByDescending(p => p.Rank).FirstOrDefault();
|
||||
}
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5c9b99696251b5c4496774c6696914e1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,8 +1,6 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using UnityEngine.UI;
|
||||
using DG.Tweening;
|
||||
|
||||
public class LetterSlot : MonoBehaviour
|
||||
{
|
||||
@ -11,71 +9,66 @@ public class LetterSlot : MonoBehaviour
|
||||
[Header("Анимация выбора")]
|
||||
[SerializeField] private float _normalScale = 1f;
|
||||
[SerializeField] private float _selectedScale = 1.1f;
|
||||
[SerializeField] private float _animationSpeed = 5f;
|
||||
[SerializeField] private Color _normalColor;
|
||||
[SerializeField] private Color _selectedColor;
|
||||
[SerializeField] private float _animationDuration = 0.2f;
|
||||
|
||||
[SerializeField] private Color normalColor;
|
||||
[SerializeField] private Color selectedColor;
|
||||
private int _symbolIndex;
|
||||
private string _alphabet;
|
||||
private Sequence _animation;
|
||||
|
||||
public char Symbol { get; private set; }
|
||||
|
||||
[SerializeField] private AnimationCurve _animationCurve;
|
||||
private void OnDestroy() => StopAnimation();
|
||||
|
||||
private char _symbol;
|
||||
private Color _cachedColor;
|
||||
private CancellationTokenSource _cts;
|
||||
|
||||
public void Init(char symbol, bool selected)
|
||||
public void Init(char symbol, string alphabet)
|
||||
{
|
||||
SetSymbol(symbol);
|
||||
SetSelected(selected);
|
||||
_alphabet = alphabet;
|
||||
_symbolIndex = _alphabet.IndexOf(symbol);
|
||||
if( _symbolIndex < 0 ) _symbolIndex = 0;
|
||||
|
||||
SetSymbol(_symbolIndex);
|
||||
SetSelected(false, instant: true);
|
||||
}
|
||||
|
||||
public void SetSelected(bool value)
|
||||
public void SetSelected(bool selected, bool instant = false)
|
||||
{
|
||||
_cts?.Cancel();
|
||||
_cts?.Dispose();
|
||||
_cts = new CancellationTokenSource();
|
||||
|
||||
AnimAsync(selected: value, _cts.Token).Forget();
|
||||
}
|
||||
|
||||
public char GetSymbol() => _symbol;
|
||||
|
||||
public void SetSymbol(char symbol)
|
||||
{
|
||||
_symbol = symbol;
|
||||
UpdateLabel();
|
||||
}
|
||||
|
||||
private void UpdateLabel() => _label.text = _symbol.ToString();
|
||||
|
||||
private async UniTask AnimAsync(bool selected, CancellationToken token)
|
||||
{
|
||||
Color startColor = _label.color;
|
||||
float startScale = transform.localScale.x;
|
||||
|
||||
Color targetColor = selected ? selectedColor : normalColor;
|
||||
StopAnimation();
|
||||
float targetScale = selected ? _selectedScale : _normalScale;
|
||||
Color targetColor = selected ? _selectedColor : _normalColor;
|
||||
|
||||
float t = 0;
|
||||
while (t < 1f && !token.IsCancellationRequested)
|
||||
if (instant)
|
||||
{
|
||||
float t1 = _animationCurve.Evaluate(t);
|
||||
|
||||
transform.localScale = Vector3.one * Mathf.Lerp(startScale, targetScale, t1);
|
||||
_label.color = Color.Lerp(startColor, targetColor, t1);
|
||||
|
||||
t += Time.deltaTime * _animationSpeed;
|
||||
t = Mathf.Min(t, 1f);
|
||||
|
||||
await UniTask.Yield(PlayerLoopTiming.Update, token);
|
||||
transform.localScale = Vector3.one * targetScale;
|
||||
_label.color = targetColor;
|
||||
return;
|
||||
}
|
||||
|
||||
transform.localScale = Vector3.one * targetScale;
|
||||
_label.color = targetColor;
|
||||
_animation = DOTween.Sequence();
|
||||
_animation.Join(transform.DOScale(targetScale, _animationDuration));
|
||||
_animation.Join(_label.DOColor(targetColor, _animationDuration));
|
||||
|
||||
_animation.PlayForward();
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
public void ChangeSymbol(int direction)
|
||||
{
|
||||
_cts?.Cancel();
|
||||
_cts?.Dispose();
|
||||
_symbolIndex = (_symbolIndex + direction + _alphabet.Length) % _alphabet.Length;
|
||||
SetSymbol(_symbolIndex);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetSymbol(int index)
|
||||
{
|
||||
Symbol = _alphabet[index];
|
||||
_label.text = Symbol.ToString();
|
||||
}
|
||||
|
||||
private void StopAnimation()
|
||||
{
|
||||
if (_animation != null)
|
||||
{
|
||||
_animation.Kill();
|
||||
_animation = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,28 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class TextInput : MonoBehaviour, ICompletable
|
||||
public class TextInput : MonoBehaviour
|
||||
{
|
||||
public event Action<string> OnComplete;
|
||||
|
||||
[Header("Генерация")]
|
||||
[SerializeField] private GameObject _letterSlotPrefab;
|
||||
[SerializeField] private RectTransform _group;
|
||||
|
||||
[Header("Управление")]
|
||||
[SerializeField] private InSignal _nextSlot;
|
||||
[SerializeField] private InSignal _prevSlot;
|
||||
[SerializeField] private InSignal _nextSymbol;
|
||||
[SerializeField] private InSignal _prevSymbol;
|
||||
[SerializeField] private List<InSignal> _exitSignals;
|
||||
[SerializeField] private float _timeToExit = 2;
|
||||
|
||||
[Header("Ключ prefs")]
|
||||
[SerializeField] private string key;
|
||||
[SerializeField] private bool loadData;
|
||||
[SerializeField] private bool saveDataOnClose;
|
||||
|
||||
[Header("Настройки генерации поля")]
|
||||
[SerializeField] private int slotsCount = 11;
|
||||
[SerializeField] private LetterSlot _letterSlotPrefab;
|
||||
[SerializeField] private RectTransform _cellsRoot;
|
||||
|
||||
[Header("Звуки")]
|
||||
[SerializeField] private AudioClip switchSlotSound;
|
||||
@ -30,155 +15,99 @@ public class TextInput : MonoBehaviour, ICompletable
|
||||
[SerializeField] private AudioClip acceptSound;
|
||||
[SerializeField] private AudioClip openSound;
|
||||
|
||||
[Header("Алфавит")]
|
||||
[SerializeField] private string alphabetString = "0123456789";
|
||||
|
||||
[Header("Скорость переключения букв")]
|
||||
[SerializeField] private float MaxSpeedLetterPerSecond = 8;
|
||||
[SerializeField] private float MinSpeedLetterPerSecond = 3;
|
||||
[SerializeField] private float MaxSpeedTime = 3;
|
||||
[SerializeField] private float MinSpeedTime = 0.5f;
|
||||
|
||||
[SerializeField]
|
||||
|
||||
private float switchButtonPressedTime = 0;
|
||||
private float letterSwitchSpeed = 0;
|
||||
private float switchDelayRest = 1;
|
||||
|
||||
private int _slotIndex = 0;
|
||||
private float exitTimer = 0;
|
||||
|
||||
private LetterSlot[] _slots;
|
||||
|
||||
public event Action OnComplete;
|
||||
|
||||
private LetterSlot _activeSlot => _slots[_slotIndex];
|
||||
|
||||
private bool exitRequested = false;
|
||||
private bool ready;
|
||||
private bool completionRequested = false;
|
||||
|
||||
|
||||
public void Initialize()
|
||||
private void Start()
|
||||
{
|
||||
Generate();
|
||||
LoadSavedData();
|
||||
string initial = PlayerPrefs.GetString(PrefsKeyVault.NUMBER_TECH, "");
|
||||
Initialize(11, Alphabets.DIGITS, initial);
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
public void Initialize(int cellsAmount, string alphabet, string initialString = "")
|
||||
{
|
||||
ready = false;
|
||||
Generate(cellsAmount, alphabet);
|
||||
InitializeSlots(initialString);
|
||||
}
|
||||
|
||||
private void Update()//условия завершения добавить
|
||||
private void Update()
|
||||
{
|
||||
if (!ready)
|
||||
{
|
||||
ready = !(In.GetButton(_nextSlot) || In.GetButton(_prevSlot) || In.GetButton(_nextSymbol) || In.GetButton(_prevSymbol));
|
||||
return;
|
||||
}
|
||||
int dir_h = In.GetAxis(Axis.Horizontal, JoystickSide.Both, InteractMode.Discrete);
|
||||
SwitchSlot(dir_h);
|
||||
|
||||
int dir_v = In.GetAxis(Axis.Vertical, JoystickSide.Both, InteractMode.Continious);
|
||||
SwitchLetter(dir_v);
|
||||
|
||||
if (exitRequested)
|
||||
{
|
||||
exitTimer = 0;
|
||||
exitRequested = false;
|
||||
|
||||
Exit();
|
||||
return;
|
||||
}
|
||||
|
||||
int dir = 0;
|
||||
if (In.GetButtonDown(_nextSlot)) dir += 1;
|
||||
if (In.GetButtonDown(_prevSlot)) dir -= 1;
|
||||
SwitchSlot(dir);
|
||||
|
||||
dir = 0;
|
||||
if (In.GetButton(_nextSymbol)) dir += 1;
|
||||
if (In.GetButton(_prevSymbol)) dir -= 1;
|
||||
SwitchLetter(dir);
|
||||
|
||||
if (ExitCombinationPressed())
|
||||
{
|
||||
exitTimer += Time.deltaTime;
|
||||
}
|
||||
else
|
||||
{
|
||||
exitTimer -= Time.deltaTime;
|
||||
}
|
||||
exitTimer = Mathf.Clamp(exitTimer, 0f, _timeToExit);
|
||||
|
||||
exitRequested = exitTimer >= _timeToExit;
|
||||
completionRequested = In.GetButtonAnyPlayer(PlayerAction.action);
|
||||
if (completionRequested)
|
||||
Complete();
|
||||
}
|
||||
|
||||
private void Exit()
|
||||
private void Complete()
|
||||
{
|
||||
SaveAndClose();
|
||||
OnComplete?.Invoke();
|
||||
string result = CollectText();
|
||||
OnComplete?.Invoke(result);
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
public string SaveAndClose()
|
||||
{
|
||||
string result = GetText();
|
||||
|
||||
if (!string.IsNullOrEmpty(key) && saveDataOnClose)
|
||||
private void Generate(int cellsAmount, string alphabet)
|
||||
{
|
||||
ClearCells();
|
||||
_slots = new LetterSlot[cellsAmount];
|
||||
|
||||
for (int i = 0; i < cellsAmount; i++)
|
||||
{
|
||||
PlayerPrefs.SetString(key, result);
|
||||
var cell = Instantiate(_letterSlotPrefab, _cellsRoot);
|
||||
cell.Init(alphabet[0], alphabet);
|
||||
_slots[i] = cell;
|
||||
}
|
||||
|
||||
Clear();
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
private void Generate()
|
||||
{
|
||||
_slots = new LetterSlot[slotsCount];
|
||||
for (int i = 0; i < slotsCount; i++)
|
||||
{
|
||||
var go = Instantiate(_letterSlotPrefab.gameObject, _group);
|
||||
_slots[i] = go.GetComponent<LetterSlot>();
|
||||
_slots[i].Init(alphabetString[0], false);
|
||||
}
|
||||
_slotIndex = 0;
|
||||
_slots[0].SetSelected(true);
|
||||
|
||||
}
|
||||
private void LoadSavedData()//Тут надо проработать
|
||||
{
|
||||
string data = "";
|
||||
|
||||
if (loadData)
|
||||
data = PlayerPrefs.GetString(key, "");
|
||||
|
||||
// Очищаем все слоты
|
||||
for (int i = 0; i < slotsCount; i++)
|
||||
{
|
||||
_slots[i].SetSymbol(alphabetString[0]);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(data))
|
||||
{
|
||||
int minLength = Mathf.Min(data.Length, slotsCount);
|
||||
for (int i = 0; i < minLength; i++)
|
||||
{
|
||||
_slots[i].SetSymbol(data[i]);
|
||||
}
|
||||
}
|
||||
_slots[_slotIndex].SetSelected(true);
|
||||
}
|
||||
|
||||
public void SwitchSlot(int discreteDirection)
|
||||
private void InitializeSlots(string initialString)
|
||||
{
|
||||
if (discreteDirection == 0) return;
|
||||
for (int i = 0; i < _slots.Length; i++)
|
||||
_slots[i].SetSymbol(0);
|
||||
|
||||
if (string.IsNullOrEmpty(initialString))
|
||||
return;
|
||||
|
||||
int minLength = Mathf.Min(initialString.Length, _slots.Length);
|
||||
|
||||
for (int i = 0; i < minLength; i++)
|
||||
_slots[i].SetSymbol(initialString[i]);
|
||||
}
|
||||
|
||||
public void SwitchSlot(int dir)
|
||||
{
|
||||
if (dir == 0) return;
|
||||
|
||||
_activeSlot.SetSelected(false);
|
||||
ChangeIndexBounded(ref _slotIndex, delta: discreteDirection, length: slotsCount);
|
||||
_slotIndex = Mathf.Clamp(_slotIndex + dir, 0, _slots.Length);
|
||||
_activeSlot.SetSelected(true);
|
||||
}
|
||||
|
||||
public void SwitchLetter(int continiousDirection)
|
||||
public void SwitchLetter(int dir)
|
||||
{
|
||||
continiousDirection = Mathf.Clamp(continiousDirection, -1, 1);
|
||||
if (continiousDirection == 0)//сброс переключения
|
||||
if (dir == 0)
|
||||
{
|
||||
switchDelayRest = 0;
|
||||
switchButtonPressedTime = 0;
|
||||
@ -187,13 +116,10 @@ public class TextInput : MonoBehaviour, ICompletable
|
||||
|
||||
if (switchDelayRest < 0)
|
||||
{
|
||||
//переключение
|
||||
int currentLetterindex = getSymbolIndex(_activeSlot.GetSymbol(), alphabetString);
|
||||
ChangeIndexLooped(ref currentLetterindex, delta: continiousDirection, alphabetString.Length);
|
||||
_activeSlot.SetSymbol(alphabetString[currentLetterindex]);
|
||||
|
||||
_activeSlot.ChangeSymbol(dir);
|
||||
recalculateRest();
|
||||
}
|
||||
|
||||
switchDelayRest -= Time.deltaTime;
|
||||
switchButtonPressedTime += Time.deltaTime;
|
||||
|
||||
@ -209,44 +135,23 @@ public class TextInput : MonoBehaviour, ICompletable
|
||||
MaxSpeedLetterPerSecond);
|
||||
switchDelayRest = 1 / letterSwitchSpeed;
|
||||
}
|
||||
|
||||
int getSymbolIndex(char symbol, string alphabet) => alphabet.IndexOf(symbol);
|
||||
}
|
||||
|
||||
|
||||
public void Clear()
|
||||
private void ClearCells()
|
||||
{
|
||||
foreach (var slot in _slots)
|
||||
for (int i = _cellsRoot.childCount - 1; i >= 0; i--)
|
||||
{
|
||||
Destroy(slot.gameObject);
|
||||
var cell = _cellsRoot.GetChild(i).gameObject;
|
||||
Destroy(cell);
|
||||
}
|
||||
_slots = null;
|
||||
}
|
||||
|
||||
public string GetText()
|
||||
private string CollectText()
|
||||
{
|
||||
System.Text.StringBuilder sb = new();
|
||||
foreach (var slot in _slots)
|
||||
sb.Append(slot.GetSymbol());
|
||||
sb.Append(slot.Symbol);
|
||||
return sb.ToString().Trim();
|
||||
}
|
||||
|
||||
private
|
||||
|
||||
static void ChangeIndexLooped(ref int index, int delta, int length)
|
||||
=> index = (index + delta + length) % length;
|
||||
|
||||
static void ChangeIndexBounded(ref int index, int delta, int length)
|
||||
=> index = Mathf.Clamp(index + delta, 0, length - 1);
|
||||
|
||||
private bool ExitCombinationPressed()
|
||||
{
|
||||
foreach (var signal in _exitSignals)
|
||||
{
|
||||
if (In.GetButton(signal) == false)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
8
Assets/Scripts/Statics.meta
Normal file
8
Assets/Scripts/Statics.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8b7bd53b46dd4754094169359f4a2046
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
4
Assets/Scripts/Statics/Alphabets.cs
Normal file
4
Assets/Scripts/Statics/Alphabets.cs
Normal file
@ -0,0 +1,4 @@
|
||||
public static class Alphabets
|
||||
{
|
||||
public const string DIGITS = "0123456789";
|
||||
}
|
||||
2
Assets/Scripts/Statics/Alphabets.cs.meta
Normal file
2
Assets/Scripts/Statics/Alphabets.cs.meta
Normal file
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c6360be17c6d9ce4386fa96f5be66e44
|
||||
@ -1,16 +1,11 @@
|
||||
using UnityEngine;
|
||||
using PrizeSystem;
|
||||
using UnityEngine;
|
||||
|
||||
public class SettingFunctions : MonoBehaviour
|
||||
{
|
||||
public void ResetBalance()
|
||||
{
|
||||
public void ResetBalance() => PaymentSystem.ResetBalance();
|
||||
|
||||
}
|
||||
|
||||
public void ResetPrizeError()
|
||||
{
|
||||
|
||||
}
|
||||
public void ResetPrizeError() => PrizeSystemManager.SetPrizingError(false);
|
||||
|
||||
public void ConfigurePrizes()
|
||||
{
|
||||
@ -44,7 +39,8 @@ public class SettingFunctions : MonoBehaviour
|
||||
|
||||
public void HopperTest()
|
||||
{
|
||||
|
||||
var prize = PrizeUtils.CreatePrize(CountablePrizeType.Hopper, 1);
|
||||
PrizeSystemManager.GivePrize(prize);
|
||||
}
|
||||
|
||||
public void QrTest()
|
||||
@ -71,4 +67,4 @@ public class SettingFunctions : MonoBehaviour
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
34
Assets/SignalCatcher.cs
Normal file
34
Assets/SignalCatcher.cs
Normal file
@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
|
||||
public class SignalCatcher : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private List<SignalCallback> _signalCallbacks;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
SignalView.SignalEmmited += HandleSignal;
|
||||
}
|
||||
|
||||
private void HandleSignal(string signal)
|
||||
{
|
||||
var signalCallback = _signalCallbacks.Find((s) => s.signal == signal);
|
||||
|
||||
if (signalCallback.signal == null)
|
||||
{
|
||||
Debug.LogError($"Не найден колбэк для сигнала {signal}");
|
||||
return;
|
||||
}
|
||||
|
||||
signalCallback.callback?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct SignalCallback
|
||||
{
|
||||
public string signal;
|
||||
public UnityEvent callback;
|
||||
}
|
||||
2
Assets/SignalCatcher.cs.meta
Normal file
2
Assets/SignalCatcher.cs.meta
Normal file
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bff18535cd20b2a4ba0e6b6a43b3680b
|
||||
Loading…
x
Reference in New Issue
Block a user