lvjincheng 4 лет назад
Родитель
Сommit
6f41a8f635
25 измененных файлов с 1320 добавлено и 581 удалено
  1. 8 0
      Assets/BowArrow/Resources/Fonts.meta
  2. 0 0
      Assets/BowArrow/Resources/Fonts/智能黑体.ttf
  3. 0 0
      Assets/BowArrow/Resources/Fonts/智能黑体.ttf.meta
  4. 331 355
      Assets/BowArrow/Resources/Prefabs/Views/ShopView.prefab
  5. 0 0
      Assets/BowArrow/Resources/Textures/Common/Icon001.png
  6. 0 0
      Assets/BowArrow/Resources/Textures/Common/Icon001.png.meta
  7. 0 0
      Assets/BowArrow/Resources/Textures/Common/Icon002.png
  8. 0 0
      Assets/BowArrow/Resources/Textures/Common/Icon002.png.meta
  9. 0 0
      Assets/BowArrow/Resources/Textures/Common/Icon003.png
  10. 0 0
      Assets/BowArrow/Resources/Textures/Common/Icon003.png.meta
  11. 399 4
      Assets/BowArrow/Scenes/Game.unity
  12. 0 112
      Assets/BowArrow/Scenes/Test.unity
  13. 36 1
      Assets/BowArrow/Scripts/Components/TextAutoLanguage.cs
  14. 12 9
      Assets/BowArrow/Scripts/Game/Arrow.cs
  15. 18 10
      Assets/BowArrow/Scripts/Game/BowCamera.cs
  16. 98 2
      Assets/BowArrow/Scripts/Game/GameAssistUI.cs
  17. 10 9
      Assets/BowArrow/Scripts/Manager/GameMgr.cs
  18. 1 2
      Assets/BowArrow/Scripts/Manager/LoginMgr.cs
  19. 102 17
      Assets/BowArrow/Scripts/Manager/PropMgr.cs
  20. 0 23
      Assets/BowArrow/Scripts/TestA.cs
  21. 0 11
      Assets/BowArrow/Scripts/TestA.cs.meta
  22. 244 7
      Assets/BowArrow/Scripts/View/ShopView.cs
  23. 4 4
      Assets/BowArrow/Scripts/View/TopBarView.cs
  24. 3 1
      Assets/JC/ScrollPanel/Editor/ScrollPanelInspector.cs
  25. 54 14
      Assets/JC/ScrollPanel/ScrollPanel.cs

+ 8 - 0
Assets/BowArrow/Resources/Fonts.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 0ba670b762d5c2c42aeb89f3895c2b2d
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 0 - 0
Assets/BowArrow/Fonts/阿里汉仪智能黑体_爱给网_aigei_com.ttf → Assets/BowArrow/Resources/Fonts/智能黑体.ttf


+ 0 - 0
Assets/BowArrow/Fonts/阿里汉仪智能黑体_爱给网_aigei_com.ttf.meta → Assets/BowArrow/Resources/Fonts/智能黑体.ttf.meta


Разница между файлами не показана из-за своего большого размера
+ 331 - 355
Assets/BowArrow/Resources/Prefabs/Views/ShopView.prefab


+ 0 - 0
Assets/BowArrow/Textures/Home/TopBar/_0003_图标-积分.png → Assets/BowArrow/Resources/Textures/Common/Icon001.png


+ 0 - 0
Assets/BowArrow/Textures/Home/TopBar/_0003_图标-积分.png.meta → Assets/BowArrow/Resources/Textures/Common/Icon001.png.meta


+ 0 - 0
Assets/BowArrow/Textures/Home/TopBar/_0004_图标-金币.png → Assets/BowArrow/Resources/Textures/Common/Icon002.png


+ 0 - 0
Assets/BowArrow/Textures/Home/TopBar/_0004_图标-金币.png.meta → Assets/BowArrow/Resources/Textures/Common/Icon002.png.meta


+ 0 - 0
Assets/BowArrow/Textures/Home/TopBar/_0005_图标-钻石.png → Assets/BowArrow/Resources/Textures/Common/Icon003.png


+ 0 - 0
Assets/BowArrow/Textures/Home/TopBar/_0005_图标-钻石.png.meta → Assets/BowArrow/Resources/Textures/Common/Icon003.png.meta


+ 399 - 4
Assets/BowArrow/Scenes/Game.unity

@@ -340,6 +340,37 @@ Transform:
   m_Father: {fileID: 892318431}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0.000001055608, y: 0.0000021718977, z: 19.078863}
+--- !u!1 &63973839
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 63973840}
+  m_Layer: 0
+  m_Name: Scope
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!4 &63973840
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 63973839}
+  m_LocalRotation: {x: 0.5, y: 0.5, z: -0.5, w: 0.5}
+  m_LocalPosition: {x: 0, y: 0, z: 0.1}
+  m_LocalScale: {x: 0, y: 0, z: 0}
+  m_Children:
+  - {fileID: 718954445}
+  m_Father: {fileID: 394830267}
+  m_RootOrder: 1
+  m_LocalEulerAnglesHint: {x: 90, y: 0, z: -90}
 --- !u!1 &65264467
 GameObject:
   m_ObjectHideFlags: 0
@@ -654,7 +685,7 @@ Transform:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 150264293}
   m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
-  m_LocalPosition: {x: 0.1006, y: -1.619, z: -0.1}
+  m_LocalPosition: {x: 0.1004, y: -1.6187, z: -0.1}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children:
   - {fileID: 99570519}
@@ -2423,6 +2454,101 @@ CanvasRenderer:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 358570230}
   m_CullTransparentMesh: 1
+--- !u!1 &368360427
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 368360428}
+  - component: {fileID: 368360430}
+  - component: {fileID: 368360429}
+  - component: {fileID: 368360431}
+  m_Layer: 5
+  m_Name: Text1
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &368360428
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 368360427}
+  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_Children: []
+  m_Father: {fileID: 1565331256}
+  m_RootOrder: 3
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 1, y: 1}
+  m_AnchorMax: {x: 1, y: 1}
+  m_AnchoredPosition: {x: -126, y: -235.9}
+  m_SizeDelta: {x: 600, y: 40}
+  m_Pivot: {x: 1, y: 0.5}
+--- !u!114 &368360429
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 368360427}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 0}
+  m_Color: {r: 1, g: 0.6509804, b: 0, a: 0}
+  m_RaycastTarget: 1
+  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+  m_Maskable: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+  m_FontData:
+    m_Font: {fileID: 12800000, guid: 1ad2cf6c2f09744489d8c60b3fe3bab2, type: 3}
+    m_FontSize: 24
+    m_FontStyle: 0
+    m_BestFit: 0
+    m_MinSize: 1
+    m_MaxSize: 40
+    m_Alignment: 5
+    m_AlignByGeometry: 0
+    m_RichText: 1
+    m_HorizontalOverflow: 0
+    m_VerticalOverflow: 0
+    m_LineSpacing: 1
+  m_Text: "\u9700\u8981\u88C5\u5907\u500D\u955C"
+--- !u!222 &368360430
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 368360427}
+  m_CullTransparentMesh: 1
+--- !u!114 &368360431
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 368360427}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: b7cbfcb0916cf694fb3d059ea4b4c1da, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  textID: 111
+  layoutRebuildObject: {fileID: 0}
+  textFormatArgs: []
 --- !u!1 &369816463
 GameObject:
   m_ObjectHideFlags: 0
@@ -2791,6 +2917,7 @@ Transform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children:
   - {fileID: 150264294}
+  - {fileID: 63973840}
   m_Father: {fileID: 0}
   m_RootOrder: 1
   m_LocalEulerAnglesHint: {x: 90, y: 0, z: 90}
@@ -2817,6 +2944,7 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   cameraComp: {fileID: 394830266}
   banRotate: 0
+  banCameraFieldOfView: 0
 --- !u!1 &408030136
 GameObject:
   m_ObjectHideFlags: 0
@@ -4040,6 +4168,89 @@ Transform:
   m_Father: {fileID: 1462346332}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!1 &718954444
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 718954445}
+  - component: {fileID: 718954447}
+  - component: {fileID: 718954446}
+  m_Layer: 0
+  m_Name: Cylinder005
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!4 &718954445
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 718954444}
+  m_LocalRotation: {x: -0, y: -0.70710677, z: -0.000000059604645, w: 0.7071068}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 0.042075004}
+  m_Children:
+  - {fileID: 1432570705}
+  m_Father: {fileID: 63973840}
+  m_RootOrder: 0
+  m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
+--- !u!23 &718954446
+MeshRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 718954444}
+  m_Enabled: 1
+  m_CastShadows: 1
+  m_ReceiveShadows: 1
+  m_DynamicOccludee: 1
+  m_StaticShadowCaster: 0
+  m_MotionVectors: 1
+  m_LightProbeUsage: 1
+  m_ReflectionProbeUsage: 1
+  m_RayTracingMode: 2
+  m_RayTraceProcedural: 0
+  m_RenderingLayerMask: 1
+  m_RendererPriority: 0
+  m_Materials:
+  - {fileID: 2100000, guid: 4fd3f0092e53bf24eba6ced35379273c, 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: 3
+  m_MinimumChartSize: 4
+  m_AutoUVMaxDistance: 0.5
+  m_AutoUVMaxAngle: 89
+  m_LightmapParameters: {fileID: 0}
+  m_SortingLayerID: 0
+  m_SortingLayer: 0
+  m_SortingOrder: 0
+  m_AdditionalVertexStreams: {fileID: 0}
+--- !u!33 &718954447
+MeshFilter:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 718954444}
+  m_Mesh: {fileID: -7816157650164661064, guid: 0331d65709214884c8349c728bb1184c, type: 3}
 --- !u!1 &724575839
 GameObject:
   m_ObjectHideFlags: 0
@@ -6827,6 +7038,101 @@ MeshFilter:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1261888289}
   m_Mesh: {fileID: 690106047850165013, guid: 2b4adce45432a4a4490e9f79aed727d9, type: 3}
+--- !u!1 &1269851398
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 1269851399}
+  - component: {fileID: 1269851401}
+  - component: {fileID: 1269851400}
+  - component: {fileID: 1269851402}
+  m_Layer: 5
+  m_Name: Text2
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &1269851399
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1269851398}
+  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_Children: []
+  m_Father: {fileID: 1565331256}
+  m_RootOrder: 4
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 1, y: 1}
+  m_AnchorMax: {x: 1, y: 1}
+  m_AnchoredPosition: {x: -126, y: -317}
+  m_SizeDelta: {x: 600, y: 40}
+  m_Pivot: {x: 1, y: 0.5}
+--- !u!114 &1269851400
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1269851398}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 0}
+  m_Color: {r: 1, g: 0.6509804, b: 0, a: 0}
+  m_RaycastTarget: 1
+  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+  m_Maskable: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+  m_FontData:
+    m_Font: {fileID: 12800000, guid: 1ad2cf6c2f09744489d8c60b3fe3bab2, type: 3}
+    m_FontSize: 24
+    m_FontStyle: 0
+    m_BestFit: 0
+    m_MinSize: 1
+    m_MaxSize: 40
+    m_Alignment: 5
+    m_AlignByGeometry: 0
+    m_RichText: 1
+    m_HorizontalOverflow: 0
+    m_VerticalOverflow: 0
+    m_LineSpacing: 1
+  m_Text: "\u9700\u8981\u88C5\u5907\u5C04\u7A0B\u5361"
+--- !u!222 &1269851401
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1269851398}
+  m_CullTransparentMesh: 1
+--- !u!114 &1269851402
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1269851398}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: b7cbfcb0916cf694fb3d059ea4b4c1da, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  textID: 112
+  layoutRebuildObject: {fileID: 0}
+  textFormatArgs: []
 --- !u!1 &1270114908
 GameObject:
   m_ObjectHideFlags: 0
@@ -7373,6 +7679,88 @@ Transform:
   m_Father: {fileID: 2097353379}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: -0.000001672786, y: -0.0000014891291, z: -62.360485}
+--- !u!1 &1432570704
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 1432570705}
+  - component: {fileID: 1432570707}
+  - component: {fileID: 1432570706}
+  m_Layer: 0
+  m_Name: Cylinder004
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!4 &1432570705
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1432570704}
+  m_LocalRotation: {x: -0.7071068, y: -0.000000029802326, z: -1.776357e-15, w: 0.70710677}
+  m_LocalPosition: {x: 0, y: 0.00040097613, z: 0}
+  m_LocalScale: {x: 1, y: 8, z: 1.361331}
+  m_Children: []
+  m_Father: {fileID: 718954445}
+  m_RootOrder: 0
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!23 &1432570706
+MeshRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1432570704}
+  m_Enabled: 1
+  m_CastShadows: 1
+  m_ReceiveShadows: 1
+  m_DynamicOccludee: 1
+  m_StaticShadowCaster: 0
+  m_MotionVectors: 1
+  m_LightProbeUsage: 1
+  m_ReflectionProbeUsage: 1
+  m_RayTracingMode: 2
+  m_RayTraceProcedural: 0
+  m_RenderingLayerMask: 1
+  m_RendererPriority: 0
+  m_Materials:
+  - {fileID: 2100000, guid: 4fd3f0092e53bf24eba6ced35379273c, 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: 3
+  m_MinimumChartSize: 4
+  m_AutoUVMaxDistance: 0.5
+  m_AutoUVMaxAngle: 89
+  m_LightmapParameters: {fileID: 0}
+  m_SortingLayerID: 0
+  m_SortingLayer: 0
+  m_SortingOrder: 0
+  m_AdditionalVertexStreams: {fileID: 0}
+--- !u!33 &1432570707
+MeshFilter:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1432570704}
+  m_Mesh: {fileID: -5208879343037863941, guid: 0331d65709214884c8349c728bb1184c, type: 3}
 --- !u!1 &1436868844
 GameObject:
   m_ObjectHideFlags: 0
@@ -7580,6 +7968,7 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   textID: 76
   layoutRebuildObject: {fileID: 0}
+  textFormatArgs: []
 --- !u!1 &1461650661
 GameObject:
   m_ObjectHideFlags: 0
@@ -8068,6 +8457,7 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   textID: 75
   layoutRebuildObject: {fileID: 0}
+  textFormatArgs: []
 --- !u!1 &1565331255
 GameObject:
   m_ObjectHideFlags: 0
@@ -8099,6 +8489,8 @@ RectTransform:
   - {fileID: 1609983390}
   - {fileID: 1170920625}
   - {fileID: 1190054620}
+  - {fileID: 368360428}
+  - {fileID: 1269851399}
   m_Father: {fileID: 1979114040}
   m_RootOrder: 5
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -8120,6 +8512,9 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   outlight: {fileID: 2100000, guid: 502f08d2109aaeb4d92b1b552bfed15c, type: 2}
+  text1: {fileID: 368360429}
+  text2: {fileID: 1269851400}
+  shootScaleValue: 0
 --- !u!1 &1579340507
 GameObject:
   m_ObjectHideFlags: 0
@@ -8228,9 +8623,9 @@ RectTransform:
   m_Father: {fileID: 1565331256}
   m_RootOrder: 0
   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: 673, y: 234}
+  m_AnchorMin: {x: 1, y: 1}
+  m_AnchorMax: {x: 1, y: 1}
+  m_AnchoredPosition: {x: -47, y: -126}
   m_SizeDelta: {x: 65, y: 67}
   m_Pivot: {x: 1, y: 1}
 --- !u!114 &1609983391

+ 0 - 112
Assets/BowArrow/Scenes/Test.unity

@@ -365,115 +365,3 @@ Transform:
   m_Father: {fileID: 0}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 45, y: 0, z: 0}
---- !u!1 &1848504193
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 6
-  m_Component:
-  - component: {fileID: 1848504197}
-  - component: {fileID: 1848504196}
-  - component: {fileID: 1848504195}
-  - component: {fileID: 1848504194}
-  - component: {fileID: 1848504198}
-  m_Layer: 5
-  m_Name: Canvas
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 1
---- !u!114 &1848504194
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1848504193}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  m_IgnoreReversedGraphics: 1
-  m_BlockingObjects: 0
-  m_BlockingMask:
-    serializedVersion: 2
-    m_Bits: 4294967295
---- !u!114 &1848504195
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1848504193}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  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 &1848504196
-Canvas:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1848504193}
-  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_AdditionalShaderChannelsFlag: 0
-  m_SortingLayerID: 0
-  m_SortingOrder: 0
-  m_TargetDisplay: 0
---- !u!224 &1848504197
-RectTransform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1848504193}
-  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_Children: []
-  m_Father: {fileID: 0}
-  m_RootOrder: 3
-  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!114 &1848504198
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1848504193}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 20d33cfc42dacbc40b7ac71e6191480f, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 

+ 36 - 1
Assets/BowArrow/Scripts/Components/TextAutoLanguage.cs

@@ -11,6 +11,7 @@ public class TextAutoLanguage : MonoBehaviour
     // static LanguageDefault language = new LanguageDefault();
     static LanguageDefault language = new LanguageEnglish();
     static HashSet<TextAutoLanguage> textAutoLanguages = new HashSet<TextAutoLanguage>();
+    public string[] textFormatArgs = {};
 
     public static void Init()
     {
@@ -56,7 +57,12 @@ public class TextAutoLanguage : MonoBehaviour
     public void SetText(int textID)
     {
         this.textID = textID;
-        this.GetComponent<Text>().text = language.GetType().GetField("text" + textID).GetValue(language).ToString();
+        string text = language.GetType().GetField("text" + textID).GetValue(language).ToString();
+        if (textFormatArgs.Length > 0)
+        {
+            text = String.Format(text, textFormatArgs);
+        }
+        this.GetComponent<Text>().text = text;
         if (layoutRebuildObject)
         {
             LayoutRebuilder.ForceRebuildLayoutImmediate(layoutRebuildObject);
@@ -183,6 +189,13 @@ class LanguageDefault {
     public string text104 = "结束";
     public string text105 = "胜利";
     public string text106 = "失败";
+    public string text107 = "已售罄";
+    public string text108 = "使用";
+    public string text109 = "使用中";
+    public string text110 = "取消";
+    public string text111 = "需要装备倍镜";
+    public string text112 = "需要装备射程卡";
+
 
     // 游戏规则
     public string text1000 = "在固定的时间内尽量射更多的箭。";
@@ -192,6 +205,14 @@ class LanguageDefault {
     public string text2002 = "获胜者获得永久积分2分,打平各1分,输者不得积分。";
     public string text2003 = "先得6分者胜利,如5局打完是平局,则加赛一箭定胜负。";
     public string text2004 = "总环数逐渐增加,挑战自己的纪录。";
+
+    //道具名称
+    public string text101000 = "{0}倍镜";
+    public string text101001 = "{0}倍射程卡";
+
+    // 道具介绍
+    public string text111000 = "射箭瞄准时,视距放大{0}倍。";
+    public string text111001 = "射箭时,射程增加{0}倍。";
 }
 class LanguageEnglish : LanguageDefault {
     public new string text1 = "Name :";
@@ -299,6 +320,12 @@ class LanguageEnglish : LanguageDefault {
     public new string text104 = "Over";
     public new string text105 = "Win";
     public new string text106 = "Lose";
+    public new string text107 = "SoldOut";
+    public new string text108 = "Use";
+    public new string text109 = "Inuse";
+    public new string text110 = "Cancel";
+    public new string text111 = "Multiple Mirrors Is Required";
+    public new string text112 = "Shoot Card Is Required";
 
     // 游戏规则
     public new string text1000 = "Shoot as many arrows as you can at a fixed time.";
@@ -308,4 +335,12 @@ class LanguageEnglish : LanguageDefault {
     public new string text2002 = "The winner will get 2 Permanent points and 1 draw each. \nThe loser will not get points.";
     public new string text2003 = "If the first 6 points win, \nif it is a draw at the end of the 5 innings, \nthe game will be decided by one arrow.";
     public new string text2004 = "The total number of rings gradually increased, \nchallenging their own records.";
+
+    //道具名称
+    public new string text101000 = "{0}X Mirrors";
+    public new string text101001 = "{0}X Shoot";
+
+    // 道具介绍
+    public new string text111000 = "When shooting, the sight distance is enlarged by {0} times.";
+    public new string text111001 = "In archery, the range increases by {0} times.";
 }

+ 12 - 9
Assets/BowArrow/Scripts/Game/Arrow.cs

@@ -8,7 +8,6 @@ public class Arrow : MonoBehaviour
     public float flyTime = 0;
     public bool isHit = false;
     public ArmBow armBow;
-
     public static float speed = 40;
     //镜头跟随飞出的箭矢
     public static bool followArrow = true;
@@ -17,7 +16,11 @@ public class Arrow : MonoBehaviour
     {
         // CrossHair.ins.gameObject.SetActive(false);
         newRigidbody = this.gameObject.AddComponent<Rigidbody>();
-        newRigidbody.velocity = this.transform.forward * speed;
+        float speedCopy = speed;
+        if (GameAssistUI.ins) {
+            speedCopy *= (1 + GameAssistUI.ins.shootScaleValue);
+        } 
+        newRigidbody.velocity = this.transform.forward * speedCopy;
         newRigidbody.collisionDetectionMode = CollisionDetectionMode.ContinuousDynamic;
 
         this.transform.Find("Camera").gameObject.SetActive(followArrow);
@@ -156,7 +159,13 @@ public class Arrow : MonoBehaviour
             if (d < 0.001f) {
                 cameraMoveFinish = true;
                 if (followArrow) {
-                    this.Invoke("nextShoot", 1.0f);
+                    Sequence seq = DOTween.Sequence();
+                    seq.AppendInterval(1.0f);
+                    seq.AppendCallback(delegate() {
+                        nextShoot();
+                        Destroy(cameraT.gameObject);
+                        this.enabled = false;
+                    });
                 }
             }
         } else {
@@ -172,15 +181,9 @@ public class Arrow : MonoBehaviour
     public void nextShoot() {
         if (!GameMgr.ins.gameMode.DoNextShoot()) return;
         this.armBow.readyShoot();
-        this.Invoke("destroySelf", 0.05f);
         // CrossHair.ins.gameObject.SetActive(true);
     }
 
-    void destroySelf() {
-        Destroy(this.transform.Find("Camera").gameObject);
-        this.enabled = false;
-    }
-
     void OnCollisionEnter(Collision collision) {
         if ((1 << collision.gameObject.layer) != LayerMask.GetMask("Target")) 
         {

+ 18 - 10
Assets/BowArrow/Scripts/Game/BowCamera.cs

@@ -11,9 +11,14 @@ public class BowCamera : MonoBehaviour
     public Camera cameraComp;
     // 用于禁止相机旋转外部接口
     public bool banRotate = false;
+    public bool banCameraFieldOfView = false;
 
     void Update()
     {
+        if (cameraComp && !banCameraFieldOfView) {
+            cameraComp.fieldOfView = cameraFieldOfView;
+        }
+
         if (GameMgr.ins.gameOver || banRotate) {
            return;
         }
@@ -57,29 +62,32 @@ public class BowCamera : MonoBehaviour
         }
     }
 
-    public void setFieldOfView(float value, bool isPlus) {
-        cameraComp.fieldOfView = isPlus ? cameraComp.fieldOfView + value : value;
+    float cameraFieldOfView = 60;
+
+    public void SetCameraFieldOfView(float value)
+    {
+        cameraComp.fieldOfView = value;
     }
 
-    public void resumeFieldOfView() {
-        cameraComp.fieldOfView = 60;
+    public void setFieldOfView(float value, bool isPlus) {
+        cameraFieldOfView = isPlus ? cameraFieldOfView + value : value;
     }
 
     public void updateFollowPullBow() {
-        if (cameraComp.fieldOfView > 40) {
-            cameraComp.fieldOfView -= 20 * Time.deltaTime;
+        if (cameraFieldOfView > 40) {
+            cameraFieldOfView -= 20 * Time.deltaTime;
         } else {
-            cameraComp.fieldOfView = 40;
+            cameraFieldOfView = 40;
         }
     }
 
     public Action onViewRecovery = null;
 
     public void updateGiveUpPullBow() {
-        if (cameraComp.fieldOfView < 60) {
-            cameraComp.fieldOfView += 20 * Time.deltaTime;
+        if (cameraFieldOfView < 60) {
+            cameraFieldOfView += 20 * Time.deltaTime;
         } else {
-            cameraComp.fieldOfView = 60;
+            cameraFieldOfView = 60;
             if (onViewRecovery != null) {
                 onViewRecovery();
                 onViewRecovery = null;

+ 98 - 2
Assets/BowArrow/Scripts/Game/GameAssistUI.cs

@@ -2,12 +2,18 @@ using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 using UnityEngine.UI;
+using DG.Tweening;
 
 public class GameAssistUI : MonoBehaviour
 {
     [SerializeField] Material outlight;
+    [SerializeField] Text text1;
+    [SerializeField] Text text2;
+    public static GameAssistUI ins;
+
     void Start()
     {
+        ins = this;
         this.transform.Find("Button1").GetComponent<Button>().onClick.AddListener(delegate(){
             GameRuleView.Create();
         });
@@ -16,16 +22,106 @@ public class GameAssistUI : MonoBehaviour
         btnScaleAim.onClick.AddListener(delegate(){
             if (btnScaleAim.GetComponentInChildren<Image>().material == outlight) {
                 btnScaleAim.GetComponentInChildren<Image>().material = null;
+                closeScaleAim();
             } else {
-                btnScaleAim.GetComponentInChildren<Image>().material = outlight;
+                if (openScaleAim()) {
+                    btnScaleAim.GetComponentInChildren<Image>().material = outlight;
+                }
             }
         });
         btnScaleShoot.onClick.AddListener(delegate(){
             if (btnScaleShoot.GetComponentInChildren<Image>().material == outlight) {
                 btnScaleShoot.GetComponentInChildren<Image>().material = null;
+                closeScaleShoot();
             } else {
-                btnScaleShoot.GetComponentInChildren<Image>().material = outlight;
+                if (openScaleShoot()) {
+                    btnScaleShoot.GetComponentInChildren<Image>().material = outlight;
+                }
             }
         });
     }
+    Transform scope = null;
+    float[] scaleAimFieldOfViews = {30, 20, 12, 6, 3};
+    float[] scaleAimArmBowZs = {-0.813f, -0.799f, -0.77f, -0.695f, -0.55f};
+    float[] scaleAimScopeScales = {150, 98, 58, 29, 14.5f};
+    Sequence seq1 = null;
+    bool openScaleAim()
+    {   
+        int scaleValue = GetPropScaleAimValue();
+        if (scaleValue > 0) 
+        {
+            BowCamera bowCamera = GameObject.FindObjectOfType<BowCamera>();
+            bowCamera.banCameraFieldOfView = true;
+            CrossHair.ins.gameObject.GetComponent<RectTransform>().sizeDelta = new Vector2(500, 500);
+            bowCamera.SetCameraFieldOfView(scaleAimFieldOfViews[scaleValue - 1]);
+            Vector3 localPosition = ArmBow.ins.transform.localPosition;
+            localPosition.z = -2;
+            ArmBow.ins.transform.localPosition = localPosition;
+            scope = bowCamera.transform.Find("Scope");
+            float scopeScale = scaleAimScopeScales[scaleValue - 1];
+            scope.localScale = new Vector3(scopeScale, scopeScale, scopeScale);
+            return true;
+        }
+        if (seq1 != null && !seq1.IsComplete()) {
+            seq1.Complete();
+        }
+        seq1 = DOTween.Sequence();
+        seq1.Append(text1.DOFade(1, 0.5f));
+        seq1.AppendInterval(2);
+        seq1.Append(text1.DOFade(0, 0.5f));
+        return false;
+    }
+
+    void closeScaleAim()
+    {
+        BowCamera bowCamera = GameObject.FindObjectOfType<BowCamera>();
+        bowCamera.banCameraFieldOfView = false;
+        CrossHair.ins.gameObject.GetComponent<RectTransform>().sizeDelta = new Vector2(260, 260);
+        Vector3 localPosition = ArmBow.ins.transform.localPosition;
+        localPosition.z = -0.1f;
+        ArmBow.ins.transform.localPosition = localPosition;
+        scope.localScale = new Vector3(0, 0, 0);
+        scope = null;
+    }
+
+    int GetPropScaleAimValue()
+    {
+        List<PropInfo> props = PropMgr.ins.ListForEquipped();
+        foreach (var prop in props)
+        {
+            if (prop.config.type == 1) {
+                PropScaleAim config = prop.config as PropScaleAim;
+                return config.scaleValue;
+            }
+        }
+        return 0;
+    }
+
+    public int shootScaleValue = 0;
+    Sequence seq2 = null;
+
+    bool openScaleShoot()
+    {   
+        List<PropInfo> props = PropMgr.ins.ListForEquipped();
+        foreach (var prop in props)
+        {
+            if (prop.config.type == 2) {
+                PropScaleShoot config = prop.config as PropScaleShoot;
+                shootScaleValue = config.scaleValue;
+                return true;
+            }
+        }
+        if (seq2 != null && !seq2.IsComplete()) {
+            seq2.Complete();
+        }
+        seq2 = DOTween.Sequence();
+        seq2.Append(text2.DOFade(1, 0.5f));
+        seq2.AppendInterval(2);
+        seq2.Append(text2.DOFade(0, 0.5f));
+        return false;
+    }
+    void closeScaleShoot()
+    {
+        shootScaleValue = 0;
+    }
 }

+ 10 - 9
Assets/BowArrow/Scripts/Manager/GameMgr.cs

@@ -59,15 +59,16 @@ public class GameMgr : MonoBehaviour
 
     bool guideFinish = false;
     public void CheckGuide() {
-        if (!LoginMgr.myUserInfo.deviceCalibrateGuideFinish) {
-            DeviceCalibrateView.Create();
-            return;
-        }
-        // int gameType = GameMgr.gameType;
-        bool gameRuleGuideFinish = (bool)LoginMgr.myUserInfo.GetType().GetField($"gameRule{GameMgr.gameType}GuideFinish").GetValue(LoginMgr.myUserInfo);
-        if (!gameRuleGuideFinish) {
-            GameRuleView.Create();
-            return;
+        if (gameType > 0) {
+            if (!LoginMgr.myUserInfo.deviceCalibrateGuideFinish) {
+                DeviceCalibrateView.Create();
+                return;
+            }
+            bool gameRuleGuideFinish = (bool)LoginMgr.myUserInfo.GetType().GetField($"gameRule{GameMgr.gameType}GuideFinish").GetValue(LoginMgr.myUserInfo);
+            if (!gameRuleGuideFinish) {
+                GameRuleView.Create();
+                return;
+            }
         }
         guideFinish = true;
         gameMode.Start();

+ 1 - 2
Assets/BowArrow/Scripts/Manager/LoginMgr.cs

@@ -238,8 +238,7 @@ public class UserInfo {
     public string region = "";
     public int integral = 0;
     public int coin = 0;
-    public int diamond = 0;
-    public List<PropInfo> equipList = new List<PropInfo>();
+    public int diamond = 1000;
     public List<PropInfo> bagList = new List<PropInfo>();
     public int timeLimitGameHighestScore = 0;
     public bool deviceCalibrateGuideFinish = false;

+ 102 - 17
Assets/BowArrow/Scripts/Manager/PropMgr.cs

@@ -1,6 +1,7 @@
 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
+using Newtonsoft.Json;
 
 public class PropMgr {
     static PropMgr _ins = null;
@@ -14,17 +15,27 @@ public class PropMgr {
     }
 
     Hashtable propConfigs = new Hashtable();
+    List<int> propConfigIds = new List<int>();
     public PropMgr()
     {
         for (int i = 1; i <= 5; i++) 
         {
             PropScaleAim propScaleAim = new PropScaleAim(10, i);
-            propConfigs.Add(propScaleAim.id, propScaleAim);
+            CachePropConfig(propScaleAim.id, propScaleAim);
+        }
+        for (int i = 1; i <= 5; i++) 
+        {
             PropScaleShoot propScaleShoot = new PropScaleShoot(20, i);
-            propConfigs.Add(propScaleShoot.id, propScaleShoot);
+            CachePropConfig(propScaleShoot.id, propScaleShoot);
         }
     }
 
+    void CachePropConfig(int id, PropConfig propConfig)
+    {
+        propConfigs.Add(id, propConfig);
+        propConfigIds.Add(id);
+    }
+
     public PropConfig GetPropConfig(int id)
     {
         return (PropConfig) propConfigs[id];
@@ -33,50 +44,124 @@ public class PropMgr {
     public List<PropConfig> ListForShop()
     {
         List<PropConfig> list = new List<PropConfig>();
-        foreach (var p in propConfigs)
+        foreach (int id in propConfigIds)
         {
-            list.Add((PropConfig) p);
+            list.Add((PropConfig) propConfigs[id]);
+        }
+        return list;
+    }
+    public List<PropInfo> ListForBag()
+    {
+        List<PropInfo> list = LoginMgr.myUserInfo.bagList;
+        foreach (var propInfo in list)
+        {
+            propInfo.config = (PropConfig) propConfigs[propInfo.id];
+        }
+        return list;
+    }
+    public List<PropInfo> ListForEquipped()
+    {
+        List<PropInfo> list = new List<PropInfo>();
+        foreach (var propInfo in LoginMgr.myUserInfo.bagList)
+        {   
+            if (propInfo.inuse) {
+                propInfo.config = (PropConfig) propConfigs[propInfo.id];
+                list.Add(propInfo);
+            }
         }
         return list;
     }
+    //商店购买接口
+    public bool isSoldOut(PropConfig propConfig)
+    {   
+        if (propConfig.type == 1 || propConfig.type == 2) 
+        {
+            List<PropInfo> myProps = LoginMgr.myUserInfo.bagList;
+            foreach (var myProp in myProps)
+            {
+                if (myProp.id == propConfig.id && myProp.count > 0) return true;
+            }
+        }
+        return false;
+    } 
+    public bool buyProp(PropConfig propConfig)
+    {   
+        if (LoginMgr.myUserInfo.diamond >= propConfig.diamond) {
+            LoginMgr.myUserInfo.diamond -= propConfig.diamond;
+            PropInfo propInfo = new PropInfo();
+            propInfo.id = propConfig.id;
+            propInfo.count = 1;
+            LoginMgr.myUserInfo.bagList.Add(propInfo);
+            LoginMgr.myUserInfo.Save();
+            return true;
+        }
+        return false;
+    }
+    public bool useProp(PropInfo propInfo)
+    {
+        if (!propInfo.inuse) {
+            if (propInfo.config.type == 1 || propInfo.config.type == 2) {
+                List<PropInfo> equippeds = ListForEquipped();
+                foreach (var equipped in equippeds)
+                {
+                    if (equipped.config.type == propInfo.config.type) {
+                        equipped.inuse = false;
+                    }
+                }
+            }
+        }
+        propInfo.inuse = !propInfo.inuse;
+        LoginMgr.myUserInfo.Save();
+        return propInfo.inuse;
+    }
+
+    public void DebugAddAndUseProp(int id)
+    {
+        PropInfo propInfo = new PropInfo();
+        propInfo.id = id;
+        propInfo.inuse = true;
+        LoginMgr.myUserInfo.bagList.Add(propInfo);
+    }
 }
 public class PropInfo {
     public int id = 0;
     public int count = 1;
+    [JsonIgnore]
+    public PropConfig config = null;
+    public bool inuse = false;
 }
 public class PropConfig {
     public int id = 0;
     public int type = 0;
     public int iconID = 0;
-    public string name = "";
-    public string detail = "";
+    public string[] name = {null};
+    public string[] detail = {null};
     public int difficulty = -1;
-    public int coin = 0;
     public int diamond = 0;
 }
 public class PropScaleAim : PropConfig {
-    int scaleFinalValue = 0;
+    public int scaleValue = 0;
     public PropScaleAim(int baseID, int scaleValue)
     {
-        scaleFinalValue = scaleValue + 1;
+        this.scaleValue = scaleValue;
         id = baseID + scaleValue;
         type = 1;
         iconID = 1000;
-        name = scaleValue + "倍镜";
-        detail = $"射箭瞄准时,视距放大{scaleValue}倍。"; 
+        name = new string[]{"101000", scaleValue.ToString()};
+        detail = new string[]{"111000", scaleValue.ToString()}; 
         diamond = scaleValue * 20;
     }
 }
 public class PropScaleShoot : PropConfig {
-    public int scaleFinalValue = 0;
+    public int scaleValue = 0;
     public PropScaleShoot(int baseID, int scaleValue)
     {
-        scaleFinalValue = scaleValue + 1;
+        this.scaleValue = scaleValue;
         id = baseID + scaleValue;
-        type = 1;
-        iconID = 1000;
-        name = scaleValue + "倍射程卡";
-        detail = $"射箭时,射程增加{scaleValue}倍。"; 
+        type = 2;
+        iconID = 1001;
+        name = new string[]{"101001", scaleValue.ToString()};
+        detail = new string[]{"111001", scaleValue.ToString()}; 
         diamond = scaleValue * 20;
     }
 }

+ 0 - 23
Assets/BowArrow/Scripts/TestA.cs

@@ -1,23 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.UI;
-
-public class TestA : MonoBehaviour
-{
-    // Start is called before the first frame update
-    void Start()
-    {
-        GameObject go = new GameObject();
-        Text t = go.AddComponent<Text>();
-        go.transform.SetParent(this.transform);
-        go.transform.localPosition = new Vector3();
-        t.text = "Text";
-    }
-
-    // Update is called once per frame
-    void Update()
-    {
-        
-    }
-}

+ 0 - 11
Assets/BowArrow/Scripts/TestA.cs.meta

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

+ 244 - 7
Assets/BowArrow/Scripts/View/ShopView.cs

@@ -1,4 +1,5 @@
-using System.Collections;
+using System;
+using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 using UnityEngine.UI;
@@ -11,10 +12,11 @@ public class ShopView : MonoBehaviour
     [SerializeField] ScrollPanel productsPanel;
     [SerializeField] ScrollPanel bagPanel;
     [SerializeField] ScrollPanel equippedPanel;
+    [SerializeField] GameObject introduceItem;
 
     void Start() {
-        productsPanel.onReceiveItemViewInfo.AddListener(onReceiveItemViewInfo);
         InitOptions();
+        
     }
 
     void InitOptions() {
@@ -22,12 +24,240 @@ public class ShopView : MonoBehaviour
             int index = i;
             Button button = this.options.transform.GetChild(i).gameObject.AddComponent<Button>();
             button.onClick.AddListener(delegate() {
+                AudioMgr.ins.PlayBtn();
                 this.SelectOption(index);
             });
         }
         SelectOption(0);
     }
 
+    int optionID = 0;
+    void SelectOption(int index) {
+        optionID = index;
+        for (int i = 0; i < this.options.transform.childCount; i++) {
+            this.options.transform.GetChild(i).GetComponent<Image>().sprite = this.optionSprites[0];
+        }
+        this.options.transform.GetChild(index).GetComponent<Image>().sprite = this.optionSprites[1];
+        productsPanel.gameObject.SetActive(index == 0);
+        if (index == 0) InitProductsPanel();
+        bagPanel.gameObject.SetActive(index == 1);
+        if (index == 1) InitBagPanel();
+        equippedPanel.gameObject.SetActive(index == 2);
+        if (index == 2) InitEquippedPanel();
+    }
+
+    // void AddText1ToItem(GameObject gameObject, int scaleValue)
+    // {
+    //     GameObject node = new GameObject();
+    //     node.transform.SetParent(gameObject.transform);
+    //     node.transform.localScale = new Vector3(1, 1, 1);
+    //     Text t = node.AddComponent<Text>();
+    //     node.transform.localPosition = new Vector3();
+    //     t.text = "X" + scaleValue;
+    //     node.layer = LayerMask.NameToLayer("UI");
+    //     t.font = Resources.Load<Font>("Fonts/智能黑体");
+    //     t.alignment = TextAnchor.MiddleCenter;
+    //     t.fontSize = 32;
+    //     t.color = Color.black;
+    // }
+
+    bool _InitProductsPanel = false;
+    void InitProductsPanel()
+    {
+        List<PropConfig> propConfigs = PropMgr.ins.ListForShop();
+        if (!_InitProductsPanel) {
+            _InitProductsPanel = true;
+            productsPanel.onReceiveItemViewInfo.AddListener(onReceiveItemViewInfo);
+            productsPanel.onItemChange.AddListener(delegate(RectTransform item, int index) {
+                PropConfig propConfig = propConfigs[index];
+                Image img = introduceItem.transform.Find("Box/Image").GetComponent<Image>();
+                img.sprite = Resources.Load<Sprite>("Textures/Prop/" + propConfig.iconID);
+                img.SetNativeSize();
+                TextAutoLanguage autoLanguage = introduceItem.transform.Find("TextFrame/Text").GetComponent<TextAutoLanguage>();
+                autoLanguage.textFormatArgs = GetFormatArgs(propConfig.name);
+                autoLanguage.SetText(int.Parse(propConfig.name[0]));
+                TextAutoLanguage autoLanguage1 = introduceItem.transform.Find("Detail").GetComponent<TextAutoLanguage>();
+                autoLanguage1.textFormatArgs = GetFormatArgs(propConfig.detail);
+                autoLanguage1.SetText(int.Parse(propConfig.detail[0]));
+            });
+            foreach (var propConfig in propConfigs)
+            {
+                GameObject item = GameObject.Instantiate<GameObject>(
+                    productsPanel.prefabs[0], 
+                    Vector3.zero, Quaternion.identity, 
+                    productsPanel.GetComponent<ScrollRect>().content
+                );
+                item.SetActive(true);
+                productsPanel.AddItem(item.GetComponent<RectTransform>());
+                Image img = item.transform.Find("Box/Image").GetComponent<Image>();
+                img.sprite = Resources.Load<Sprite>("Textures/Prop/" + propConfig.iconID);
+                img.SetNativeSize();
+                // if (propConfig.type == 1) {
+                //     AddText1ToItem(img.gameObject, ((PropScaleAim) propConfig).scaleValue);
+                // } else if (propConfig.type == 2) {
+                //     AddText1ToItem(img.gameObject, ((PropScaleShoot) propConfig).scaleValue);
+                // }
+                TextAutoLanguage autoLanguage = item.transform.Find("TextFrame/Text").GetComponent<TextAutoLanguage>();
+                autoLanguage.textFormatArgs = GetFormatArgs(propConfig.name);
+                autoLanguage.SetText(int.Parse(propConfig.name[0]));
+                Image costIcon = item.transform.Find("Cost/Icon").GetComponent<Image>();
+                costIcon.sprite = Resources.Load<Sprite>("Textures/Common/Icon003");
+                Text costValue = item.transform.Find("Cost/Text").GetComponent<Text>();
+                costValue.text = propConfig.diamond.ToString();
+
+                Button btnBuy = item.transform.Find("BtnBuy").GetComponent<Button>();
+                
+                if (PropMgr.ins.isSoldOut(propConfig))
+                {
+                    btnBuy.interactable = false;
+                    btnBuy.GetComponentInChildren<TextAutoLanguage>().SetText(107);
+                }
+                else 
+                {
+                    btnBuy.onClick.AddListener(delegate() {
+                        PropMgr.ins.buyProp(propConfig);
+                        if (PropMgr.ins.isSoldOut(propConfig)) {
+                            btnBuy.interactable = false;
+                            btnBuy.GetComponentInChildren<TextAutoLanguage>().SetText(107);
+                        }
+                    });
+                }
+            }
+            productsPanel.UpdateItems();
+            productsPanel.SelectItemByStartIndex();
+        }
+        introduceItem.SetActive(propConfigs.Count > 0);
+    }
+
+    void InitBagPanel()
+    {
+        bagPanel.ClearItems();
+        bagPanel.onReceiveItemViewInfo.RemoveAllListeners();
+        bagPanel.onReceiveItemViewInfo.AddListener(onReceiveItemViewInfo);
+        List<PropInfo> propInfos = PropMgr.ins.ListForBag();
+        bagPanel.onItemChange.RemoveAllListeners();
+        bagPanel.onItemChange.AddListener(delegate(RectTransform item, int index) {
+            PropConfig propConfig = propInfos[index].config;
+            Image img = introduceItem.transform.Find("Box/Image").GetComponent<Image>();
+            img.sprite = Resources.Load<Sprite>("Textures/Prop/" + propConfig.iconID);
+            img.SetNativeSize();
+            TextAutoLanguage autoLanguage = introduceItem.transform.Find("TextFrame/Text").GetComponent<TextAutoLanguage>();
+            autoLanguage.textFormatArgs = GetFormatArgs(propConfig.name);
+            autoLanguage.SetText(int.Parse(propConfig.name[0]));
+            TextAutoLanguage autoLanguage1 = introduceItem.transform.Find("Detail").GetComponent<TextAutoLanguage>();
+            autoLanguage1.textFormatArgs = GetFormatArgs(propConfig.detail);
+            autoLanguage1.SetText(int.Parse(propConfig.detail[0]));
+        });
+        foreach (var propInfo in propInfos)
+        {
+            var propConfig = propInfo.config;
+            GameObject item = GameObject.Instantiate<GameObject>(
+                bagPanel.prefabs[0], 
+                Vector3.zero, Quaternion.identity, 
+                bagPanel.GetComponent<ScrollRect>().content
+            );
+            item.SetActive(true);
+            bagPanel.AddItem(item.GetComponent<RectTransform>());
+            Image img = item.transform.Find("Box/Image").GetComponent<Image>();
+            img.sprite = Resources.Load<Sprite>("Textures/Prop/" + propConfig.iconID);
+            img.SetNativeSize();
+            // if (propConfig.type == 1) {
+            //     AddText1ToItem(img.gameObject, ((PropScaleAim) propConfig).scaleValue);
+            // } else if (propConfig.type == 2) {
+            //     AddText1ToItem(img.gameObject, ((PropScaleShoot) propConfig).scaleValue);
+            // }
+            TextAutoLanguage autoLanguage = item.transform.Find("TextFrame/Text").GetComponent<TextAutoLanguage>();
+            autoLanguage.textFormatArgs = GetFormatArgs(propConfig.name);
+            autoLanguage.SetText(int.Parse(propConfig.name[0]));
+
+            Button btnUse = item.transform.Find("BtnUse").GetComponent<Button>();
+            btnUse.interactable = !propInfo.inuse;
+            btnUse.GetComponentInChildren<TextAutoLanguage>().SetText(propInfo.inuse ? 109 : 108);
+            btnUse.onClick.AddListener(delegate() {
+                PropMgr.ins.useProp(propInfo);
+                int i = 0;
+                foreach (var prop in propInfos)
+                {
+                    Button btn1 = bagPanel.itemList[i++].transform.Find("BtnUse").GetComponent<Button>();
+                    btn1.interactable = !prop.inuse;
+                    btn1.GetComponentInChildren<TextAutoLanguage>().SetText(prop.inuse ? 109 : 108);
+                }
+            });
+        }
+        bagPanel.UpdateItems();
+        bagPanel.SelectItemByStartIndex();
+        introduceItem.SetActive(propInfos.Count > 0);
+    }
+
+    void InitEquippedPanel()
+    {
+        equippedPanel.ClearItems();
+        equippedPanel.onReceiveItemViewInfo.RemoveAllListeners();
+        equippedPanel.onReceiveItemViewInfo.AddListener(onReceiveItemViewInfo);
+        List<PropInfo> propInfos = PropMgr.ins.ListForEquipped();
+        equippedPanel.onItemChange.RemoveAllListeners();
+        equippedPanel.onItemChange.AddListener(delegate(RectTransform item, int index) {
+            propInfos = PropMgr.ins.ListForEquipped();//重新拉取,因为可能增删导致数据有变
+            PropConfig propConfig = propInfos[index].config;
+            Image img = introduceItem.transform.Find("Box/Image").GetComponent<Image>();
+            img.sprite = Resources.Load<Sprite>("Textures/Prop/" + propConfig.iconID);
+            img.SetNativeSize();
+            TextAutoLanguage autoLanguage = introduceItem.transform.Find("TextFrame/Text").GetComponent<TextAutoLanguage>();
+            autoLanguage.textFormatArgs = GetFormatArgs(propConfig.name);
+            autoLanguage.SetText(int.Parse(propConfig.name[0]));
+            TextAutoLanguage autoLanguage1 = introduceItem.transform.Find("Detail").GetComponent<TextAutoLanguage>();
+            autoLanguage1.textFormatArgs = GetFormatArgs(propConfig.detail);
+            autoLanguage1.SetText(int.Parse(propConfig.detail[0]));
+        });
+        foreach (var propInfo in propInfos)
+        {
+            var propConfig = propInfo.config;
+            GameObject item = GameObject.Instantiate<GameObject>(
+                equippedPanel.prefabs[0], 
+                Vector3.zero, Quaternion.identity, 
+                equippedPanel.GetComponent<ScrollRect>().content
+            );
+            item.SetActive(true);
+            equippedPanel.AddItem(item.GetComponent<RectTransform>());
+            Image img = item.transform.Find("Box/Image").GetComponent<Image>();
+            img.sprite = Resources.Load<Sprite>("Textures/Prop/" + propConfig.iconID);
+            img.SetNativeSize();
+            // if (propConfig.type == 1) {
+            //     AddText1ToItem(img.gameObject, ((PropScaleAim) propConfig).scaleValue);
+            // } else if (propConfig.type == 2) {
+            //     AddText1ToItem(img.gameObject, ((PropScaleShoot) propConfig).scaleValue);
+            // }
+            TextAutoLanguage autoLanguage = item.transform.Find("TextFrame/Text").GetComponent<TextAutoLanguage>();
+            autoLanguage.textFormatArgs = GetFormatArgs(propConfig.name);
+            autoLanguage.SetText(int.Parse(propConfig.name[0]));
+
+            Button btnCancel = item.transform.Find("BtnCancel").GetComponent<Button>();
+            
+            btnCancel.onClick.AddListener(delegate() {
+                PropMgr.ins.useProp(propInfo);
+                if (!propInfo.inuse) {
+                    equippedPanel.RemoveItem(item.GetComponent<RectTransform>());
+                    equippedPanel.UpdateItems();
+                    equippedPanel.MoveNearestItemToCenter();
+                    introduceItem.SetActive(propInfos.Count > 0);
+                }
+            });
+        }
+        equippedPanel.UpdateItems();
+        equippedPanel.SelectItemByStartIndex();
+        introduceItem.SetActive(propInfos.Count > 0);
+    }
+
+    string[] GetFormatArgs(string[] array)
+    {
+        string[] newArray = new string[array.Length - 1];
+        for (int i = 1; i < array.Length; i++)
+        {
+            newArray[i - 1] = array[i];
+        }
+        return newArray;
+    }
+
     void onReceiveItemViewInfo(RectTransform item, Vector3 positionInView, Vector2 viewSize)
     {
         float distanceRate = Mathf.Abs(positionInView.x * 2)  / viewSize.x; 
@@ -35,11 +265,18 @@ public class ShopView : MonoBehaviour
         item.Find("Box").localScale = new Vector3(scaleRate, scaleRate, 1);
     }
 
-    void SelectOption(int index) {
-        for (int i = 0; i < this.options.transform.childCount; i++) {
-            this.options.transform.GetChild(i).GetComponent<Image>().sprite = this.optionSprites[0];
-        }
-        this.options.transform.GetChild(index).GetComponent<Image>().sprite = this.optionSprites[1];
+    public void PointerLeft()
+    {
+        if (optionID == 0) productsPanel.MoveNextToCenter(-1);
+        if (optionID == 1) bagPanel.MoveNextToCenter(-1);
+        if (optionID == 2) equippedPanel.MoveNextToCenter(-1);
+    }
+
+    public void PointerRight()
+    {
+        if (optionID == 0) productsPanel.MoveNextToCenter(1);
+        if (optionID == 1) bagPanel.MoveNextToCenter(1);
+        if (optionID == 2) equippedPanel.MoveNextToCenter(1);
     }
 
     public void Back() {

+ 4 - 4
Assets/BowArrow/Scripts/View/TopBarView.cs

@@ -16,16 +16,16 @@ public class TopBarView : MonoBehaviour
 
     void Update()
     {
-        if (itemValues[0] != LoginMgr.myUserInfo.integral) {
-            itemValues[0] = LoginMgr.myUserInfo.integral;
+        if (itemValues[0] != LoginMgr.myUserInfo.diamond) {
+            itemValues[0] = LoginMgr.myUserInfo.diamond;
             itemValueTexts[0].text = itemValues[0].ToString();
         }
         if (itemValues[1] != LoginMgr.myUserInfo.coin) {
             itemValues[1] = LoginMgr.myUserInfo.coin;
             itemValueTexts[1].text = itemValues[1].ToString();
         }
-        if (itemValues[2] != LoginMgr.myUserInfo.diamond) {
-            itemValues[2] = LoginMgr.myUserInfo.diamond;
+        if (itemValues[2] != LoginMgr.myUserInfo.integral) {
+            itemValues[2] = LoginMgr.myUserInfo.integral;
             itemValueTexts[2].text = itemValues[2].ToString();
         }
     }

+ 3 - 1
Assets/JC/ScrollPanel/Editor/ScrollPanelInspector.cs

@@ -4,11 +4,12 @@ using UnityEditor;
 public class ScrollPanelInspector : Editor
 {
     private JC.ScrollPanel scrollPanel;  
-    private SerializedProperty startIndex, spacing, openReceiveItemViewInfo, onReceiveItemViewInfo, prefabs;  
+    private SerializedProperty initType,startIndex, spacing, openReceiveItemViewInfo, onReceiveItemViewInfo, prefabs;  
 
     void OnEnable()  
     {  
         scrollPanel = target as JC.ScrollPanel;
+        initType = serializedObject.FindProperty("initType");
         startIndex = serializedObject.FindProperty("startIndex");
         spacing = serializedObject.FindProperty("spacing");
         openReceiveItemViewInfo = serializedObject.FindProperty("openReceiveItemViewInfo");  
@@ -19,6 +20,7 @@ public class ScrollPanelInspector : Editor
     public override void OnInspectorGUI()  
     {  
         serializedObject.Update();
+        EditorGUILayout.PropertyField(initType);
         EditorGUILayout.PropertyField(startIndex);
         EditorGUILayout.PropertyField(spacing);
         EditorGUILayout.PropertyField(openReceiveItemViewInfo);  

+ 54 - 14
Assets/JC/ScrollPanel/ScrollPanel.cs

@@ -9,8 +9,30 @@ namespace JC
 {
     public class ScrollPanel : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDragHandler, IPointerDownHandler, IPointerUpHandler
     {
-        ScrollRect scrollRect;
-        RectTransform rectTransform;
+        public enum InitType {
+            Statics, Dynamic
+        }
+        public InitType initType = InitType.Statics;
+        ScrollRect _scrollRect;
+        RectTransform _rectTransform;
+        ScrollRect scrollRect {
+            get {
+                if (!_scrollRect)
+                {
+                    _scrollRect = this.GetComponent<ScrollRect>();
+                }
+                return _scrollRect;
+            }
+        }
+        RectTransform rectTransform {
+            get {
+                if (!_rectTransform)
+                {
+                    _rectTransform = this.GetComponent<RectTransform>();
+                }
+                return _rectTransform;
+            }
+        }
         //解决【Content节点的AnchorPresets在Inspector中设置成了Center,但运行时的效果却是LeftTop】的问题。
         Vector3 contentPosition {
             get {
@@ -25,7 +47,7 @@ namespace JC
                 scrollRect.content.localPosition = value;
             }
         }
-        List<RectTransform> itemList = new List<RectTransform>();
+        public List<RectTransform> itemList = new List<RectTransform>();
         RectTransform minItem {
             get {
                 RectTransform bestItem = null;
@@ -57,13 +79,17 @@ namespace JC
         public bool openReceiveItemViewInfo = false;
         public UnityEvent<RectTransform, Vector3, Vector2> onReceiveItemViewInfo; 
         [Tooltip("以下节点将作为预制体,不加入ItemList中作为滚动内容,组件初始化时会隐藏预制体。")]
-        public List<GameObject> prefabs;
-
-        void Awake()
+        int currentItemIndex = -1;
+        void SetCurrentItemIndex(int index) 
         {
-            scrollRect = this.GetComponent<ScrollRect>();
-            rectTransform = this.GetComponent<RectTransform>();
+            if (index != currentItemIndex)
+            {
+                currentItemIndex = index;
+                onItemChange.Invoke(itemList[index], index);
+            }
         }
+        public UnityEvent<RectTransform, int> onItemChange;
+        public List<GameObject> prefabs;
 
         void Start()
         {
@@ -73,11 +99,19 @@ namespace JC
                 if (prefabs.Contains(item.gameObject)) {
                     item.gameObject.SetActive(false);
                 } else {
-                    AddItem(item);
+                    if (initType == InitType.Statics)
+                    {
+                        AddItem(item);
+                    }
                 }
             }            
             UpdateItems();
-            if (startIndex >= 0 || startIndex < itemList.Count) {
+            SelectItemByStartIndex();
+        }
+        public void SelectItemByStartIndex()
+        {
+            if (startIndex >= 0 && startIndex < itemList.Count) {
+                SetCurrentItemIndex(startIndex);
                 MoveItemToCenter(itemList[startIndex]);
             }
         }
@@ -89,6 +123,8 @@ namespace JC
                 if (snapIndex >= 0 && snapIndex < itemList.Count) {
                     RectTransform item = itemList[snapIndex];
                     MoveItemToCenter(item);
+                } else if (snapIndex >= itemList.Count) {
+                    snapIndex = itemList.Count - 1;
                 }
             }
         }
@@ -192,7 +228,10 @@ namespace JC
         }
 
         public void RemoveItem(RectTransform item)
-        {
+        {   
+            if (itemList.IndexOf(item) == currentItemIndex) {
+                currentItemIndex = -1;
+            }
             itemList.Remove(item);
             if (scrollRect.horizontal)
             {
@@ -215,6 +254,7 @@ namespace JC
                 Destroy(item.gameObject);
             }
             itemList.Clear();
+            currentItemIndex = -1;
         }
 
         RectTransform FindNearestItemToCenter()
@@ -234,13 +274,13 @@ namespace JC
             return bestItem;
         }
 
-        void MoveNearestItemToCenter()
+        public void MoveNearestItemToCenter()
         {
             if (itemList.Count == 0) return;
             RectTransform item = FindNearestItemToCenter();
             snapping = true;
             snapIndex = itemList.IndexOf(item);
-            MoveItemToCenter(item);
+            SetCurrentItemIndex(snapIndex);
         }
 
         void MoveItemToCenter(RectTransform item)
@@ -283,7 +323,7 @@ namespace JC
             item = itemList[index];
             snapping = true;
             snapIndex = index;
-            MoveItemToCenter(item);
+            SetCurrentItemIndex(snapIndex);
         }
 
         public void OnBeginDrag(PointerEventData eventData) {

Некоторые файлы не были показаны из-за большого количества измененных файлов