Commit 3a644f12 authored by JiangWanZhi's avatar JiangWanZhi

更新一些代码、

parent 20faca7d
fileFormatVersion: 2
guid: 97310258963f4274c914cee6aec87755
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UIWave
m_Shader: {fileID: -6465566751694194690, guid: 863ea3bf5345f1049ae1a7c0ed2f242b, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AlphaTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MaskTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _EnableExternalAlpha: 0
- _QueueControl: 1
- _QueueOffset: 0
- progress: 0.2
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Flip: {r: 1, g: 1, b: 1, a: 1}
- _RendererColor: {r: 1, g: 1, b: 1, a: 1}
- color1: {r: 0.9150943, g: 0.18560876, b: 0.18560876, a: 1}
- color2: {r: 1, g: 1, b: 1, a: 1}
m_BuildTextureStacks: []
--- !u!114 &520899111724638506
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 7
fileFormatVersion: 2
guid: 0460c98b97e90f24ea3f82ae6d555f35
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
...@@ -36,7 +36,7 @@ RectTransform: ...@@ -36,7 +36,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 125, y: 125} m_SizeDelta: {x: 135, y: 135}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &637148015308226340 --- !u!222 &637148015308226340
CanvasRenderer: CanvasRenderer:
...@@ -76,6 +76,158 @@ MonoBehaviour: ...@@ -76,6 +76,158 @@ MonoBehaviour:
m_FillOrigin: 0 m_FillOrigin: 0
m_UseSpriteMesh: 0 m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1 m_PixelsPerUnitMultiplier: 1
--- !u!1 &3184293622696171059
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7959246005771612609}
- component: {fileID: 3349564146383497322}
- component: {fileID: 6976011184890120279}
m_Layer: 5
m_Name: circle_Jindu
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7959246005771612609
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3184293622696171059}
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: 1616143210361961396}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -0}
m_SizeDelta: {x: 120, y: 120}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3349564146383497322
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3184293622696171059}
m_CullTransparentMesh: 1
--- !u!114 &6976011184890120279
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3184293622696171059}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 2100000, guid: 0460c98b97e90f24ea3f82ae6d555f35, type: 2}
m_Color: {r: 0.33922213, g: 0.3559254, b: 0.7264151, 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 &3295345382303002361
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1996675245006136864}
- component: {fileID: 35168965154362412}
- component: {fileID: 8992132832858212788}
m_Layer: 5
m_Name: circle_Di
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1996675245006136864
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3295345382303002361}
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: 1616143210361961396}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 120, y: 120}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &35168965154362412
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3295345382303002361}
m_CullTransparentMesh: 1
--- !u!114 &8992132832858212788
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3295345382303002361}
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.6792453, g: 0.16981132, b: 0.16981132, 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: 21300000, guid: c4a8d1f39b589d747ba0b9ecc99f8f5d, type: 3}
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 &5002671918916125605 --- !u!1 &5002671918916125605
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -112,7 +264,7 @@ RectTransform: ...@@ -112,7 +264,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 80, y: 50} m_SizeDelta: {x: 110, y: 70}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4645836474126822505 --- !u!222 &4645836474126822505
CanvasRenderer: CanvasRenderer:
...@@ -142,7 +294,7 @@ MonoBehaviour: ...@@ -142,7 +294,7 @@ MonoBehaviour:
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_text: 2 m_text: 22
m_isRightToLeft: 0 m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
...@@ -169,8 +321,8 @@ MonoBehaviour: ...@@ -169,8 +321,8 @@ MonoBehaviour:
m_faceColor: m_faceColor:
serializedVersion: 2 serializedVersion: 2
rgba: 4294967295 rgba: 4294967295
m_fontSize: 40 m_fontSize: 60
m_fontSizeBase: 40 m_fontSizeBase: 60
m_fontWeight: 400 m_fontWeight: 400
m_enableAutoSizing: 0 m_enableAutoSizing: 0
m_fontSizeMin: 18 m_fontSizeMin: 18
...@@ -211,102 +363,6 @@ MonoBehaviour: ...@@ -211,102 +363,6 @@ MonoBehaviour:
m_hasFontAssetChanged: 0 m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0} m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &7289411106616376695
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8453382958569157211}
- component: {fileID: 1147814174343809736}
- component: {fileID: 1787754176526650320}
- component: {fileID: 7976428067039409740}
m_Layer: 5
m_Name: circle
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8453382958569157211
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7289411106616376695}
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: 1616143210361961396}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 120, y: 120}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1147814174343809736
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7289411106616376695}
m_CullTransparentMesh: 1
--- !u!114 &1787754176526650320
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7289411106616376695}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d6a140759d40b744e891af608357385b, type: 3}
m_Name:
m_EditorClassIdentifier:
color1: {r: 1, g: 1, b: 0, a: 1}
color2: {r: 1, g: 0, b: 1, a: 1}
height: 0.1
langValue: 0.08
radius: 60
speed: 5
pause: 1
--- !u!114 &7976428067039409740
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7289411106616376695}
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: 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 &7981298386664250482 --- !u!1 &7981298386664250482
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -338,7 +394,8 @@ RectTransform: ...@@ -338,7 +394,8 @@ RectTransform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 8307886021508962735} - {fileID: 8307886021508962735}
- {fileID: 8453382958569157211} - {fileID: 1996675245006136864}
- {fileID: 7959246005771612609}
- {fileID: 1146183520943964229} - {fileID: 1146183520943964229}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: -1 m_RootOrder: -1
...@@ -422,3 +479,6 @@ MonoBehaviour: ...@@ -422,3 +479,6 @@ MonoBehaviour:
useColor: {r: 0.9612525, g: 0.9811321, b: 0, a: 1} useColor: {r: 0.9612525, g: 0.9811321, b: 0, a: 1}
index: 0 index: 0
selectLang: 0.05 selectLang: 0.05
Image_DI: {fileID: 8992132832858212788}
Image_Jindu: {fileID: 6976011184890120279}
CanPlayAniFlag: 0
...@@ -189,8 +189,8 @@ RectTransform: ...@@ -189,8 +189,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 30} m_AnchoredPosition: {x: 0, y: 18}
m_SizeDelta: {x: 0, y: 30} m_SizeDelta: {x: 0, y: 70.1}
m_Pivot: {x: 0, y: 1} m_Pivot: {x: 0, y: 1}
--- !u!222 &6452400347204923587 --- !u!222 &6452400347204923587
CanvasRenderer: CanvasRenderer:
...@@ -285,7 +285,7 @@ RectTransform: ...@@ -285,7 +285,7 @@ RectTransform:
- {fileID: 4350987738922043080} - {fileID: 4350987738922043080}
- {fileID: 2225806379496700186} - {fileID: 2225806379496700186}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: -1 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
...@@ -622,9 +622,7 @@ RectTransform: ...@@ -622,9 +622,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 3935196267496203719}
- {fileID: 4587279003709612060} - {fileID: 4587279003709612060}
- {fileID: 6771378527872526214}
- {fileID: 2406719830949511634} - {fileID: 2406719830949511634}
m_Father: {fileID: 1633357141748549960} m_Father: {fileID: 1633357141748549960}
m_RootOrder: -1 m_RootOrder: -1
...@@ -1309,42 +1307,6 @@ MonoBehaviour: ...@@ -1309,42 +1307,6 @@ MonoBehaviour:
m_hasFontAssetChanged: 0 m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0} m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &2666167341498499835
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3935196267496203719}
m_Layer: 5
m_Name: Pos_Left_Up
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3935196267496203719
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2666167341498499835}
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: 2225806379496700186}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &2929582902800575783 --- !u!1 &2929582902800575783
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -1941,7 +1903,7 @@ RectTransform: ...@@ -1941,7 +1903,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: -102}
m_SizeDelta: {x: 750, y: 25} m_SizeDelta: {x: 750, y: 25}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2831736868530311398 --- !u!222 &2831736868530311398
...@@ -2608,7 +2570,7 @@ RectTransform: ...@@ -2608,7 +2570,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 270} m_AnchoredPosition: {x: 0, y: 350}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &5697974217771189481 --- !u!1 &5697974217771189481
...@@ -2999,6 +2961,7 @@ GameObject: ...@@ -2999,6 +2961,7 @@ GameObject:
- component: {fileID: 6177109562948806136} - component: {fileID: 6177109562948806136}
- component: {fileID: 2276064347271355634} - component: {fileID: 2276064347271355634}
- component: {fileID: 8111164355371235926} - component: {fileID: 8111164355371235926}
- component: {fileID: 4404260603224327392}
m_Layer: 5 m_Layer: 5
m_Name: Content m_Name: Content
m_TagString: Untagged m_TagString: Untagged
...@@ -3088,6 +3051,20 @@ MonoBehaviour: ...@@ -3088,6 +3051,20 @@ MonoBehaviour:
m_Spacing: {x: 0, y: 0} m_Spacing: {x: 0, y: 0}
m_Constraint: 2 m_Constraint: 2
m_ConstraintCount: 1 m_ConstraintCount: 1
--- !u!114 &4404260603224327392
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5978997263012059768}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalFit: 2
m_VerticalFit: 0
--- !u!1 &6769909122946713645 --- !u!1 &6769909122946713645
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -3674,7 +3651,7 @@ RectTransform: ...@@ -3674,7 +3651,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0} m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0} m_AnchorMax: {x: 0.5, y: 0}
m_AnchoredPosition: {x: 0, y: 100} m_AnchoredPosition: {x: 0, y: 180}
m_SizeDelta: {x: 750, y: 140} m_SizeDelta: {x: 750, y: 140}
m_Pivot: {x: 0.5, y: 0} m_Pivot: {x: 0.5, y: 0}
--- !u!222 &660496339158997908 --- !u!222 &660496339158997908
...@@ -4256,42 +4233,6 @@ MonoBehaviour: ...@@ -4256,42 +4233,6 @@ MonoBehaviour:
m_hasFontAssetChanged: 0 m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0} m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &9139019227740239578
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6771378527872526214}
m_Layer: 5
m_Name: Pos_Right_Down
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6771378527872526214
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9139019227740239578}
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: 2225806379496700186}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: 0, y: 270}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1001 &157988101985480200 --- !u!1001 &157988101985480200
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
...@@ -360,7 +360,6 @@ MonoBehaviour: ...@@ -360,7 +360,6 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
target: {fileID: 1821187684178258749} target: {fileID: 1821187684178258749}
scaleSpeed: 1 scaleSpeed: 1
isLimitScale: 1
canvasCamera: {fileID: 297775247} canvasCamera: {fileID: 297775247}
ScrollRect: {fileID: 1657874420} ScrollRect: {fileID: 1657874420}
MinScale: 0.7 MinScale: 0.7
...@@ -1211,7 +1210,7 @@ PrefabInstance: ...@@ -1211,7 +1210,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1976999355571500960, guid: e2f00cfdb21d04b46adf17805f74f20c, type: 3} - target: {fileID: 1976999355571500960, guid: e2f00cfdb21d04b46adf17805f74f20c, type: 3}
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: 0 value: -20
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2018438975178189989, guid: e2f00cfdb21d04b46adf17805f74f20c, type: 3} - target: {fileID: 2018438975178189989, guid: e2f00cfdb21d04b46adf17805f74f20c, type: 3}
propertyPath: m_Layer propertyPath: m_Layer
...@@ -1725,6 +1724,10 @@ PrefabInstance: ...@@ -1725,6 +1724,10 @@ PrefabInstance:
propertyPath: m_AnchorMin.y propertyPath: m_AnchorMin.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5145632994799020238, guid: e2f00cfdb21d04b46adf17805f74f20c, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5145632994799020238, guid: e2f00cfdb21d04b46adf17805f74f20c, type: 3} - target: {fileID: 5145632994799020238, guid: e2f00cfdb21d04b46adf17805f74f20c, type: 3}
propertyPath: m_SizeDelta.y propertyPath: m_SizeDelta.y
value: -30 value: -30
...@@ -1735,7 +1738,7 @@ PrefabInstance: ...@@ -1735,7 +1738,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5145632994799020238, guid: e2f00cfdb21d04b46adf17805f74f20c, type: 3} - target: {fileID: 5145632994799020238, guid: e2f00cfdb21d04b46adf17805f74f20c, type: 3}
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: -35 value: -34.999985
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5179610333064401809, guid: e2f00cfdb21d04b46adf17805f74f20c, type: 3} - target: {fileID: 5179610333064401809, guid: e2f00cfdb21d04b46adf17805f74f20c, type: 3}
propertyPath: m_Layer propertyPath: m_Layer
...@@ -2119,7 +2122,7 @@ PrefabInstance: ...@@ -2119,7 +2122,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7778848243247776032, guid: e2f00cfdb21d04b46adf17805f74f20c, type: 3} - target: {fileID: 7778848243247776032, guid: e2f00cfdb21d04b46adf17805f74f20c, type: 3}
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: 100 value: 180
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7892800702951592232, guid: e2f00cfdb21d04b46adf17805f74f20c, type: 3} - target: {fileID: 7892800702951592232, guid: e2f00cfdb21d04b46adf17805f74f20c, type: 3}
propertyPath: m_Layer propertyPath: m_Layer
......
fileFormatVersion: 2
guid: f9856bbba089c43468de367da5f7d620
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
This source diff could not be displayed because it is too large. You can view the blob instead.
fileFormatVersion: 2
guid: 863ea3bf5345f1049ae1a7c0ed2f242b
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
...@@ -34,7 +34,6 @@ public class gameSceneAreaGroupHandler : gridView ...@@ -34,7 +34,6 @@ public class gameSceneAreaGroupHandler : gridView
{ {
var content = transform.GetComponent<ScrollRect>().content; var content = transform.GetComponent<ScrollRect>().content;
content.GetComponent<GridLayoutGroup>().enabled = false;
for (int i = 0; i < content.childCount; i++) for (int i = 0; i < content.childCount; i++)
{ {
content.GetChild(i).GetComponent<colorItem>().SetLocalRootPos(); content.GetChild(i).GetComponent<colorItem>().SetLocalRootPos();
......
...@@ -10,7 +10,6 @@ using UnityEngine; ...@@ -10,7 +10,6 @@ using UnityEngine;
using UnityEngine.Networking; using UnityEngine.Networking;
using UnityEngine.SceneManagement; using UnityEngine.SceneManagement;
using UnityEngine.UI; using UnityEngine.UI;
using static gameSceneLogic;
using System.Linq; using System.Linq;
using NatSuite.Examples; using NatSuite.Examples;
...@@ -42,7 +41,7 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler ...@@ -42,7 +41,7 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
public ReplayCam cam; public ReplayCam cam;
private int DestoryIndex = -1; private int DestoryByGID = -1;
Dictionary<string, EventChildItemBack> childEventHandlers = new Dictionary<string, EventChildItemBack>(); Dictionary<string, EventChildItemBack> childEventHandlers = new Dictionary<string, EventChildItemBack>();
void onEvent(string name, EventChildItemBack func) void onEvent(string name, EventChildItemBack func)
{ {
...@@ -145,9 +144,15 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler ...@@ -145,9 +144,15 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
}); });
} }
// Update is called once per frame // Update is called once per frame
int textindex;
void Update() void Update()
{ {
ActionManages.update(); ActionManages.update();
if (Input.GetKeyDown(KeyCode.A))
{
areaGroupList.transform.GetComponent<ScrollRect>().content.GetChild(textindex++).DOScale(0, 0.5f);
}
} }
//创建列表item的时候回调并设置、初始化和刷新 //创建列表item的时候回调并设置、初始化和刷新
...@@ -167,7 +172,6 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler ...@@ -167,7 +172,6 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
item.NowProgress = group.Jindu; item.NowProgress = group.Jindu;
if(lvbType == ListViewBackTypeEnum.create || isSelect != oldIsSelect) if(lvbType == ListViewBackTypeEnum.create || isSelect != oldIsSelect)
{ {
item.updateOneUI();
if(lvbType == ListViewBackTypeEnum.update) if(lvbType == ListViewBackTypeEnum.update)
item.switchPlayAnimation(); item.switchPlayAnimation();
} }
...@@ -198,30 +202,22 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler ...@@ -198,30 +202,22 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
var gridViewList = areaGroupList.GetComponent<gameSceneAreaGroupHandler>(); var gridViewList = areaGroupList.GetComponent<gameSceneAreaGroupHandler>();
colorItem item = null; colorItem item = null;
var maingameView = gameShowView.GetComponent<mainGameView>(); var maingameView = gameShowView.GetComponent<mainGameView>();
if (DestoryIndex != -1) if (DestoryByGID != -1)
{ {
oldindex = 0; var obj = gridViewList.GetObjByDestoryGid(DestoryByGID);
if (DestoryIndex == groupInfos.Count) if (obj == null)
{
nowidx = DestoryIndex - 1;
}
else
{ {
nowidx = (int)objects[0] - 1; DestoryByGID = -1;
return;
} }
DestoryIndex = -1; item = obj.GetComponent<colorItem>();
var ite = groupInfos[nowidx].gid; maingameView.switchShowAreaGroup((short)item.GID, (int id, bool isOk) => {
item = gridViewList.GetObjByGID(ite).GetComponent<colorItem>();
item.IsSelect = true;
item.switchPlayAnimation();
maingameView.switchShowAreaGroup((short)ite, (int id, bool isOk) => {
if (isOk) if (isOk)
{ {
transform.Find("areaGroupList/tipSelectGroup").gameObject.SetActive(false); transform.Find("areaGroupList/tipSelectGroup").gameObject.SetActive(false);
} }
}); });
DestoryByGID = -1;
return; return;
} }
...@@ -229,7 +225,6 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler ...@@ -229,7 +225,6 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
{ {
item = gridViewList.getObjectById(nowidx).GetComponent<colorItem>(); item = gridViewList.getObjectById(nowidx).GetComponent<colorItem>();
item.IsSelect = false; item.IsSelect = false;
item.updateOneUI();
item.switchPlayAnimation(); item.switchPlayAnimation();
} }
int idx = (int)objects[0]; int idx = (int)objects[0];
...@@ -247,7 +242,7 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler ...@@ -247,7 +242,7 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
}); });
Transform item_obj; Transform item_obj;
ScrollRect Rect = areaGroupList.transform.GetComponent<ScrollRect>(); Transform ItemParent = areaGroupList.transform.GetComponent<ScrollRect>().content;
float targetpos ; float targetpos ;
...@@ -257,38 +252,47 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler ...@@ -257,38 +252,47 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
{ {
targetpos = -(120 * (nowidx - 4) - 20 + 5 * 2); targetpos = -(120 * (nowidx - 4) - 20 + 5 * 2);
if (targetpos < Rect.content.localPosition.x) if (targetpos < ItemParent.localPosition.x)
{ {
Rect.content.DOLocalMoveX(targetpos, 1f); ItemParent.DOLocalMoveX(targetpos, 1f);
return; return;
} }
} }
} }
else if (oldindex > nowidx) //点的左边的 else if (oldindex > nowidx) //点的左边的
{ {
targetpos = -(120 * (nowidx - 1) + 10); targetpos = -(120 * (nowidx - 1) + 10);
if (targetpos > Rect.content.localPosition.x) if (targetpos > ItemParent.localPosition.x)
{ {
Rect.content.DOLocalMoveX(targetpos, 1f); ItemParent.DOLocalMoveX(targetpos, 1f);
return; return;
} }
} }
int itemNum = Rect.content.childCount; int itemNum = ItemParent.childCount;
for (int i = 0; i < itemNum; i++) for (int i = 0; i < itemNum; i++)
{ {
if (i == nowidx) if (i == nowidx)
continue; continue;
item_obj = Rect.content.GetChild(i); item_obj = ItemParent.GetChild(i);
item_obj.GetComponent<colorItem>().ChangeLocalPos_Select(i < nowidx, nowidx, item.transform.localPosition.x); item_obj.GetComponent<colorItem>().ChangeLocalPos_Select(i < nowidx, nowidx, item.transform.localPosition.x);
} }
//StartCoroutine(DelayToRefreshGrid()); StartCoroutine(DelayToRefreshGrid());
}
IEnumerator DelayToRefreshGrid()
{
yield return new WaitForSeconds(0.3f);
Transform ItemParent = areaGroupList.transform.GetComponent<ScrollRect>().content;
int itemNum = ItemParent.childCount;
Transform item;
for (int i = 0; i < itemNum; i++)
{
item = ItemParent.GetChild(i);
item.GetComponent<colorItem>().ReSetPos();
}
} }
//游戏图片初始化完成 //游戏图片初始化完成
private void onEvent_gameViewOnInitEnd_Handler(List<UnityEngine.Object> uobjects, List<System.Object> objects) private void onEvent_gameViewOnInitEnd_Handler(List<UnityEngine.Object> uobjects, List<System.Object> objects)
{ {
...@@ -320,7 +324,6 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler ...@@ -320,7 +324,6 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
gradViewBack gradView = (GameObject gobject, int idx, ListViewBackTypeEnum lvbType) => { gradViewBack gradView = (GameObject gobject, int idx, ListViewBackTypeEnum lvbType) => {
if (lvbType == ListViewBackTypeEnum.create){ if (lvbType == ListViewBackTypeEnum.create){
var ci = gobject.GetComponent<colorItem>(); var ci = gobject.GetComponent<colorItem>();
ci.resetSize(cellSize.x,cellSize.y);
} }
this.onUpdateGroupGridHandler(gobject, idx, lvbType, groupInfos[idx],true); this.onUpdateGroupGridHandler(gobject, idx, lvbType, groupInfos[idx],true);
}; };
...@@ -680,35 +683,14 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler ...@@ -680,35 +683,14 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
{ {
groupInfos.Remove(groupdinfo); groupInfos.Remove(groupdinfo);
} }
//切换组
//if (autoSwitchGroup == false) nowidx = -1;
//Vector2 size = gridViewList.getCellSize();
//gradViewBack gradView = (GameObject gobject, int idx, ListViewBackTypeEnum lvbType) =>
//{
// if (lvbType == ListViewBackTypeEnum.create)
// {
// var gagi = gobject.GetComponent<colorItem>();
// if (gagi == null)
// {
// Debug.Log("gagi == null");
// }
// gagi.resetSize(size.x, size.y);
// }
// this.onUpdateGroupGridHandler(gobject, idx, lvbType, groupInfos[idx], false);
//};
//gridViewList.setDataNoGrid(groupInfos.Count, tempValue1, tempValue2, tempValue3, gradView, false);
if (groupInfos.Count <= 1) if (groupInfos.Count <= 1)
{ {
Debug.LogError($"没有组了,涂完了"); Debug.LogError($"没有组了,涂完了");
} }
else else
{ {
SubAGorpItem(nowidx); SubAGorpItem(nowAidByGid);
} }
//gridViewList.setData(groupInfos.Count, gradView,false); //gridViewList.setData(groupInfos.Count, gradView,false);
//震动 //震动
if (vibration) if (vibration)
...@@ -739,55 +721,71 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler ...@@ -739,55 +721,71 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
} }
} }
private void SubAGorpItem(int index) //去掉一个组的item的动画效果 private void SubAGorpItem(int gid) //去掉一个组的item的动画效果
{ {
ScrollRect Rect = areaGroupList.transform.GetComponent<ScrollRect>(); Transform ItemParent = areaGroupList.transform.GetComponent<ScrollRect>().content;
Transform item = Rect.content.GetChild(index); Transform item = null;
DestoryIndex = index;
item.DOScale(Vector3.zero, 0.5f).onComplete = () =>
{
Destroy(item.gameObject);
if (Rect.content.childCount - 1 > index)
{
Rect.content.sizeDelta = new Vector2(Rect.content.sizeDelta.x - 120, Rect.content.sizeDelta.y);
}
for (int i = 0; i < Rect.content.childCount; i++) int index = 0;
for (int i = 0; i < ItemParent.childCount; i++)
{
var ite = ItemParent.GetChild(i).GetComponent<colorItem>();
if (ite != null)
{ {
if (i > index) if (ite.GID == gid)
{ {
Rect.content.GetChild(i).GetComponent<colorItem>().index = i - 1; item = ite.transform;
Rect.content.GetChild(i).name = Rect.content.GetChild(i).name.Replace($"{i}", $"{i - 1}"); index = i;
break;
} }
} }
}
DestoryByGID = gid;
if (item == null)
{
Debug.LogError($"要销毁的组ID:{gid}没有找到对应的列表成员!!!!");
return;
}
item.DOScale(Vector3.zero, 0.5f).onComplete = () =>
{
Debug.LogError($"这里销毁的组ID是:{gid} ");
Destroy(item.gameObject);
}; };
if (Rect.content.childCount - 1 == index && Rect.content.localPosition.x < -120) //最右边的那个
if (ItemParent.childCount - 1 == gid && ItemParent.localPosition.x < -120) //最右边的那个
{ {
Rect.content.DOLocalMoveX(Rect.content.localPosition.x + 120, 0.5f);//.onComplete = () => { Rect.content.sizeDelta = new Vector2(Rect.content.sizeDelta.x - 120, Rect.content.sizeDelta.y); }; ItemParent.DOLocalMoveX(ItemParent.localPosition.x + 120, 0.5f);//.onComplete = () => { Rect.content.sizeDelta = new Vector2(Rect.content.sizeDelta.x - 120, Rect.content.sizeDelta.y); };
} }
else else
{ {
for (int i = 0; i < Rect.content.childCount; i++) for (int i = 0; i < ItemParent.childCount; i++)
{ {
if (i > index) if (i > index)
{ {
Rect.content.GetChild(i).DOLocalMoveX(Rect.content.GetChild(i).localPosition.x - 120, 0.6f); ItemParent.GetChild(i).DOLocalMoveX(ItemParent.GetChild(i).localPosition.x - 120, 0.6f);
ItemParent.GetChild(i).GetComponent<colorItem>().index = i - 1;
ItemParent.GetChild(i).name = ItemParent.GetChild(i).name.Replace($"{i}", $"{i - 1}");
} }
} }
} }
if (index < Rect.content.childCount - 1) var Nextitme = areaGroupList.GetComponent<gameSceneAreaGroupHandler>().GetObjByDestoryGid(DestoryByGID).GetComponent<colorItem>();
Rect.content.GetChild(index + 1).GetComponent<colorItem>().onClickAreaGroup();
else if (index > 0) Debug.LogError($"移除的组ID是:{DestoryByGID} 现在的组ID是:{Nextitme.GID}");
{ Nextitme.IsSelect = true;
Rect.content.GetChild(index - 1).GetComponent<colorItem>().onClickAreaGroup(); Nextitme.onClickAreaGroup();
} Nextitme.switchPlayAnimation();
oldindex = nowidx;
nowidx = Nextitme.index;
} }
public void onRemoveGroupByGidEvent(List<UnityEngine.Object> uobjects, List<System.Object> objects) public void onRemoveGroupByGidEvent(List<UnityEngine.Object> uobjects, List<System.Object> objects)
{ {
return;
short gid = (short)objects[0]; short gid = (short)objects[0];
short gid1 = (short)objects[1]; short gid1 = (short)objects[1];
for (int i = 0; i < groupInfos.Count; i++) for (int i = 0; i < groupInfos.Count; i++)
......
...@@ -29,7 +29,7 @@ public class gameUserInfos : MonoBehaviour, IEventHandler ...@@ -29,7 +29,7 @@ public class gameUserInfos : MonoBehaviour, IEventHandler
if (utilsTools.ContainsKeyGDataByKey("NativeGameData") == false) if (utilsTools.ContainsKeyGDataByKey("NativeGameData") == false)
{ {
string json = "{\"append\":\"\",\"classId\":\"1,8,10,14\",\"displayDate\":\"20221102\",\"enterType\":\"0\",\"extraJson\":\"{\\\"cut_height\\\": 0, \\\"refer_drawer\\\": \\\"DoMyzu\\\"}\",\"extraType\":0,\"file\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H.zip\",\"highImg\":\"https://d21z6ifg4bbv2v.cloudfront.net/tspng/cc--EDgRpc_nHQru7H.png\",\"hybridType\":64,\"id\":\"cc--EDgRpc_nHQru7H\",\"originalJson\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsjson/cc--EDgRpc_nHQru7H.json\",\"picAssets\":\"{\\\"pictureBin\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/zsD2ySwS4pJ25frj.p\\\", \\\"pictureThn4\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/V8ZvUuDlOEB7mifd.png\\\", \\\"pictureColorThn4\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/IDdMO8yT0fPPhUtU.jpg?x-oss-process\\u003dstyle/cc400\\\", \\\"pictureWallThn8\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/oWqHjCo5mQvXIVP_.png\\\", \\\"pictureWallColorThn8\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/IDdMO8yT0fPPhUtU.jpg?x-oss-process\\u003dstyle/cc800\\\"}\",\"pictureBin\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H_pictureBin.p\",\"pictureColorThn4\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H_pictureColorThn4.jpg\",\"pictureThn4\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H_pictureThn4.png\",\"schedule\":0,\"seriesName\":\"\",\"sid\":2967,\"sort\":80,\"type\":6}"; string json = "{\"append\":\"\",\"classId\":\"1,8,10,14\",\"displayDate\":\"20221102\",\"enterType\":\"0\",\"extraJson\":\"{\\\"cut_height\\\": 0, \\\"refer_drawer\\\": \\\"DoMyzu\\\"}\",\"extraType\":0,\"file\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H.zip\",\"highImg\":\"https://d21z6ifg4bbv2v.cloudfront.net/tspng/cc--EDgRpc_nHQru7H.png\",\"hybridType\":64,\"id\":\"cc--EDgRpc_nHQru7H\",\"originalJson\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsjson/cc--EDgRpc_nHQru7H.json\",\"picAssets\":\"{\\\"pictureBin\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/zsD2ySwS4pJ25frj.p\\\", \\\"pictureThn4\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/V8ZvUuDlOEB7mifd.png\\\", \\\"pictureColorThn4\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/IDdMO8yT0fPPhUtU.jpg?x-oss-process\\u003dstyle/cc400\\\", \\\"pictureWallThn8\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/oWqHjCo5mQvXIVP_.png\\\", \\\"pictureWallColorThn8\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/IDdMO8yT0fPPhUtU.jpg?x-oss-process\\u003dstyle/cc800\\\"}\",\"pictureBin\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H_pictureBin.p\",\"pictureColorThn4\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H_pictureColorThn4.jpg\",\"pictureThn4\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H_pictureThn4.png\",\"schedule\":0,\"seriesName\":\"\",\"sid\":2967,\"sort\":80,\"type\":6}";
json = json.Replace( "cc--EDgRpc_nHQru7H", "cclY0Z15BcgRtGkP5O"); json = json.Replace( "cc--EDgRpc_nHQru7H", "cc0ZjIuxBvc0xJZygm");
utilsTools.setGDataByKey("NativeGameData", JsonUtility.FromJson<netLableImageItem>(json)); utilsTools.setGDataByKey("NativeGameData", JsonUtility.FromJson<netLableImageItem>(json));
} }
......
...@@ -207,8 +207,8 @@ public class HomePageLibrary : MonoBehaviour,IEventHandler ...@@ -207,8 +207,8 @@ public class HomePageLibrary : MonoBehaviour,IEventHandler
} }
}, false); }, false);
GameObject gameObjectContext = grid.GetComponent<ScrollRect>().content.gameObject; //GameObject gameObjectContext = grid.GetComponent<ScrollRect>().content.gameObject;
gameObjectContext.GetComponent<GridLayoutGroup>().SetLayoutHorizontal(); //gameObjectContext.GetComponent<GridLayoutGroup>().SetLayoutHorizontal();
} }
private bool onLabelsInit(string data) private bool onLabelsInit(string data)
{ {
......
...@@ -84,10 +84,10 @@ public class Native : MonoBehaviour ...@@ -84,10 +84,10 @@ public class Native : MonoBehaviour
Debug.Log("JSON:" + json); Debug.Log("JSON:" + json);
json = "{\"append\":\"\",\"classId\":\"1,8,10,14\",\"displayDate\":\"20221102\",\"enterType\":\"0\",\"extraJson\":\"{\\\"cut_height\\\": 0, \\\"refer_drawer\\\": \\\"DoMyzu\\\"}\",\"extraType\":0,\"file\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H.zip\",\"highImg\":\"https://d21z6ifg4bbv2v.cloudfront.net/tspng/cc--EDgRpc_nHQru7H.png\",\"hybridType\":64,\"id\":\"cc--EDgRpc_nHQru7H\",\"originalJson\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsjson/cc--EDgRpc_nHQru7H.json\",\"picAssets\":\"{\\\"pictureBin\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/zsD2ySwS4pJ25frj.p\\\", \\\"pictureThn4\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/V8ZvUuDlOEB7mifd.png\\\", \\\"pictureColorThn4\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/IDdMO8yT0fPPhUtU.jpg?x-oss-process\\u003dstyle/cc400\\\", \\\"pictureWallThn8\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/oWqHjCo5mQvXIVP_.png\\\", \\\"pictureWallColorThn8\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/IDdMO8yT0fPPhUtU.jpg?x-oss-process\\u003dstyle/cc800\\\"}\",\"pictureBin\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H_pictureBin.p\",\"pictureColorThn4\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H_pictureColorThn4.jpg\",\"pictureThn4\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H_pictureThn4.png\",\"schedule\":0,\"seriesName\":\"\",\"sid\":2967,\"sort\":80,\"type\":6}"; json = "{\"append\":\"\",\"classId\":\"1,8,10,14\",\"displayDate\":\"20221102\",\"enterType\":\"0\",\"extraJson\":\"{\\\"cut_height\\\": 0, \\\"refer_drawer\\\": \\\"DoMyzu\\\"}\",\"extraType\":0,\"file\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H.zip\",\"highImg\":\"https://d21z6ifg4bbv2v.cloudfront.net/tspng/cc--EDgRpc_nHQru7H.png\",\"hybridType\":64,\"id\":\"cc--EDgRpc_nHQru7H\",\"originalJson\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsjson/cc--EDgRpc_nHQru7H.json\",\"picAssets\":\"{\\\"pictureBin\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/zsD2ySwS4pJ25frj.p\\\", \\\"pictureThn4\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/V8ZvUuDlOEB7mifd.png\\\", \\\"pictureColorThn4\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/IDdMO8yT0fPPhUtU.jpg?x-oss-process\\u003dstyle/cc400\\\", \\\"pictureWallThn8\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/oWqHjCo5mQvXIVP_.png\\\", \\\"pictureWallColorThn8\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/IDdMO8yT0fPPhUtU.jpg?x-oss-process\\u003dstyle/cc800\\\"}\",\"pictureBin\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H_pictureBin.p\",\"pictureColorThn4\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H_pictureColorThn4.jpg\",\"pictureThn4\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H_pictureThn4.png\",\"schedule\":0,\"seriesName\":\"\",\"sid\":2967,\"sort\":80,\"type\":6}";
string name = "cclY0Z15BcgRtGkP5O"; string name = "cc0ZjIuxBvc0xJZygm";
json = json.Replace("cc--EDgRpc_nHQru7H", name); json = json.Replace("cc--EDgRpc_nHQru7H", name);
//json = "{\"append\":\"\",\"classId\":\"1,8,10,14\",\"displayDate\":\"20221102\",\"enterType\":\"0\",\"extraJson\":\"{\\\"cut_height\\\": 0, \\\"refer_drawer\\\": \\\"DoMyzu\\\"}\",\"extraType\":0,\"file\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/ccnKNH1bTLS-_Mg7A2.zip\",\"highImg\":\"https://d21z6ifg4bbv2v.cloudfront.net/tspng/ccnKNH1bTLS-_Mg7A2.png\",\"hybridType\":64,\"id\":\"ccnKNH1bTLS-_Mg7A2\",\"originalJson\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsjson/ccnKNH1bTLS-_Mg7A2.json\",\"picAssets\":\"{\\\"pictureBin\\\": \\\"ccv1/production-pic/20221027/ccnKNH1bTLS-_Mg7A2/zsD2ySwS4pJ25frj.p\\\", \\\"pictureThn4\\\": \\\"ccv1/production-pic/20221027/ccnKNH1bTLS-_Mg7A2/V8ZvUuDlOEB7mifd.png\\\", \\\"pictureColorThn4\\\": \\\"ccv1/production-pic/20221027/ccnKNH1bTLS-_Mg7A2/IDdMO8yT0fPPhUtU.jpg?x-oss-process\\u003dstyle/cc400\\\", \\\"pictureWallThn8\\\": \\\"ccv1/production-pic/20221027/ccnKNH1bTLS-_Mg7A2/oWqHjCo5mQvXIVP_.png\\\", \\\"pictureWallColorThn8\\\": \\\"ccv1/production-pic/20221027/ccnKNH1bTLS-_Mg7A2/IDdMO8yT0fPPhUtU.jpg?x-oss-process\\u003dstyle/cc800\\\"}\",\"pictureBin\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/ccnKNH1bTLS-_Mg7A2_pictureBin.p\",\"pictureColorThn4\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/ccnKNH1bTLS-_Mg7A2_pictureColorThn4.jpg\",\"pictureThn4\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/ccnKNH1bTLS-_Mg7A2_pictureThn4.png\",\"schedule\":0,\"seriesName\":\"\",\"sid\":2967,\"sort\":80,\"type\":6}"; //json = "{\"append\":\"\",\"classId\":\"1,8,10,14\",\"displayDate\":\"20221102\",\"enterType\":\"0\",\"extraJson\":\"{\\\"cut_height\\\": 0, \\\"refer_drawer\\\": \\\"DoMyzu\\\"}\",\"extraType\":0,\"file\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/ccnKNH1bTLS-_Mg7A2.zip\",\"highImg\":\"https://d21z6ifg4bbv2v.cloudfront.net/tspng/ccnKNH1bTLS-_Mg7A2.png\",\"hybridType\":64,\"id\":\"ccnKNH1bTLS-_Mg7A2\",\"originalJson\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsjson/ccnKNH1bTLS-_Mg7A2.json\",\"picAssets\":\"{\\\"pictureBin\\\": \\\"ccv1/production-pic/20221027/ccnKNH1bTLS-_Mg7A2/zsD2ySwS4pJ25frj.p\\\", \\\"pictureThn4\\\": \\\"ccv1/production-pic/20221027/ccnKNH1bTLS-_Mg7A2/V8ZvUuDlOEB7mifd.png\\\", \\\"pictureColorThn4\\\": \\\"ccv1/production-pic/20221027/ccnKNH1bTLS-_Mg7A2/IDdMO8yT0fPPhUtU.jpg?x-oss-process\\u003dstyle/cc400\\\", \\\"pictureWallThn8\\\": \\\"ccv1/production-pic/20221027/ccnKNH1bTLS-_Mg7A2/oWqHjCo5mQvXIVP_.png\\\", \\\"pictureWallColorThn8\\\": \\\"ccv1/production-pic/20221027/ccnKNH1bTLS-_Mg7A2/IDdMO8yT0fPPhUtU.jpg?x-oss-process\\u003dstyle/cc800\\\"}\",\"pictureBin\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/ccnKNH1bTLS-_Mg7A2_pictureBin.p\",\"pictureColorThn4\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/ccnKNH1bTLS-_Mg7A2_pictureColorThn4.jpg\",\"pictureThn4\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/ccnKNH1bTLS-_Mg7A2_pictureThn4.png\",\"schedule\":0,\"seriesName\":\"\",\"sid\":2967,\"sort\":80,\"type\":6}";
//#endif //#endif
utilsTools.setGDataByKey("NativeGameData", JsonUtility.FromJson<netLableImageItem>(json)); utilsTools.setGDataByKey("NativeGameData", JsonUtility.FromJson<netLableImageItem>(json));
SceneManager.LoadScene(utilsTools.getGameSceneName()); SceneManager.LoadScene(utilsTools.getGameSceneName());
......
...@@ -30,36 +30,36 @@ public class gridView : MonoBehaviour ...@@ -30,36 +30,36 @@ public class gridView : MonoBehaviour
{ {
if(isFirstSetData) if(isFirstSetData)
{ {
isFirstSetData = false; //isFirstSetData = false;
GameObject gameObjectContext = GetComponent<ScrollRect>().content.gameObject; //GameObject gameObjectContext = GetComponent<ScrollRect>().content.gameObject;
var gridLayout = gameObjectContext.GetComponent<GridLayoutGroup>(); //var gridLayout = gameObjectContext.GetComponent<GridLayoutGroup>();
if(gridLayout != null) //if(gridLayout != null)
{ //{
Vector2 temp; // Vector2 temp;
utilsTools.DeviceAdaptationSize(gridLayout.cellSize, out temp); // utilsTools.DeviceAdaptationSize(gridLayout.cellSize, out temp);
if (LockCellWidthEqHeight) // if (LockCellWidthEqHeight)
{ // {
if (useVec) // if (useVec)
{ // {
temp.y = temp.x; // temp.y = temp.x;
} // }
else // else
{ // {
temp.x = temp.y; // temp.x = temp.y;
} // }
} // }
gridLayout.cellSize = temp; // gridLayout.cellSize = temp;
Vector2 lt = new Vector2(gridLayout.padding.left, gridLayout.padding.top); // Vector2 lt = new Vector2(gridLayout.padding.left, gridLayout.padding.top);
Vector2 rd = new Vector2(gridLayout.padding.right, gridLayout.padding.bottom); // Vector2 rd = new Vector2(gridLayout.padding.right, gridLayout.padding.bottom);
utilsTools.DeviceAdaptationSize(lt, out temp); // utilsTools.DeviceAdaptationSize(lt, out temp);
gridLayout.padding.left = (int)temp.x; // gridLayout.padding.left = (int)temp.x;
gridLayout.padding.top = (int)temp.y; // gridLayout.padding.top = (int)temp.y;
utilsTools.DeviceAdaptationSize(rd, out temp); // utilsTools.DeviceAdaptationSize(rd, out temp);
gridLayout.padding.left = (int)temp.x; // gridLayout.padding.left = (int)temp.x;
gridLayout.padding.bottom = (int)temp.y; // gridLayout.padding.bottom = (int)temp.y;
utilsTools.DeviceAdaptationSize(gridLayout.spacing, out temp); // utilsTools.DeviceAdaptationSize(gridLayout.spacing, out temp);
gridLayout.spacing = temp; // gridLayout.spacing = temp;
} //}
} }
} }
public GameObject getObjectById(int id) public GameObject getObjectById(int id)
...@@ -86,6 +86,28 @@ public class gridView : MonoBehaviour ...@@ -86,6 +86,28 @@ public class gridView : MonoBehaviour
} }
return null; return null;
} }
public Transform GetObjByDestoryGid(int Gid) //获取销毁的这个组下面或者上一个item
{
Transform parent = transform.GetComponent<ScrollRect>().content;
for (int i = 0; i < parent.childCount; i++)
{
var item = parent.GetChild(i).GetComponent<colorItem>();
if (item.GID == Gid)
{
if (i < parent.childCount - 1)
{
return parent.GetChild(i + 1);
}
else
{
return parent.GetChild(i - 1);
}
}
}
return null;
}
virtual public Vector2 getOffset() virtual public Vector2 getOffset()
{ {
var gameObjectContext = GetComponent<ScrollRect>(); var gameObjectContext = GetComponent<ScrollRect>();
...@@ -117,77 +139,9 @@ public class gridView : MonoBehaviour ...@@ -117,77 +139,9 @@ public class gridView : MonoBehaviour
GameObject gameObjectContext = GetComponent<ScrollRect>().content.gameObject; GameObject gameObjectContext = GetComponent<ScrollRect>().content.gameObject;
var gridLayout = gameObjectContext.GetComponent<GridLayoutGroup>(); var gridLayout = gameObjectContext.GetComponent<GridLayoutGroup>();
string firstKey = ""; string firstKey = "";
Dictionary<string, Tuple<string,GameObject>> dicts = new Dictionary<string, Tuple<string, GameObject>>();
foreach (var item in perfabPaths)
{
string[] names = item.Split("/");
string key = names[names.Length - 1];
if(firstKey.Equals(""))
{
firstKey = key;
}
//dicts.Add(key, new Tuple<string, GameObject>(item, Resources.Load<GameObject>(item)));
dicts.Add(key, new Tuple<string, GameObject>(item, listItem));
}
var rectTransform = gameObjectContext.GetComponent<RectTransform>();
int count = gridLayout.constraintCount;
List<Tuple<string, float>> infos = new List<Tuple<string, float>>(); List<Tuple<string, float>> infos = new List<Tuple<string, float>>();
float coutPixel = 0;
if (getGradViewInfo == null)
{
if (useVec)
{
coutPixel = Mathf.Ceil(size/count) * gridLayout.cellSize.y;
}
else
coutPixel = Mathf.Ceil(size / count) * gridLayout.cellSize.x;
}
else {
string itemKey = "";
float itemHeight = 0;
for (int i = 0; i < size; i++)
{
getGradViewInfo(i, ref itemKey, ref itemHeight);
if(itemHeight < 1 || dicts.ContainsKey(itemKey) == false)
{
Debug.LogError("param error " + itemKey + " height " + itemHeight.ToSafeString());
return ;
}
coutPixel = coutPixel + itemHeight;
infos.Add(new Tuple<string, float>(itemKey, itemHeight));
}
}
if (useVec)
{
float h = GetComponent<RectTransform>().rect.height;
float spacingLen = 0;
if (size > count)
{
spacingLen = gridLayout.spacing.y * (Mathf.Ceil(size / count) - 1);
}
float height = spacingLen + coutPixel + gridLayout.padding.top + gridLayout.padding.bottom;
if (height > h)
{
h = height - h;
}
rectTransform.sizeDelta = new Vector2(rectTransform.sizeDelta.x, h);
}
else
{
float w = GetComponent<RectTransform>().rect.width;
float spacingLen = 0;
if (size > count)
{
spacingLen = gridLayout.spacing.x * (Mathf.Ceil(size / count) - 1);
}
float width = spacingLen + coutPixel + gridLayout.padding.left + gridLayout.padding.right;
if (width > w)
{
w = width - w;
}
rectTransform.sizeDelta = new Vector2(w, rectTransform.sizeDelta.y);
}
utilsTools.setGDataByKey("listViewTempCellSize", new Vector2(gridLayout.cellSize.x, gridLayout.cellSize.y)); utilsTools.setGDataByKey("listViewTempCellSize", new Vector2(gridLayout.cellSize.x, gridLayout.cellSize.y));
for (int i = 0; i < size; i++) for (int i = 0; i < size; i++)
{ {
...@@ -195,16 +149,13 @@ public class gridView : MonoBehaviour ...@@ -195,16 +149,13 @@ public class gridView : MonoBehaviour
var childTransform = gameObjectContext.transform.Find(name); var childTransform = gameObjectContext.transform.Find(name);
string newItemType = firstKey; string newItemType = firstKey;
if(infos.Count > 0)
{
newItemType = infos[i].Item1;
}
GameObject itemObject = null; GameObject itemObject = null;
if (childTransform != null) if (childTransform != null)
{ {
itemObject = childTransform.gameObject; itemObject = childTransform.gameObject;
string oldItemType = ""; string oldItemType = "";
if(true == utilsTools.getUserData<string>(itemObject, "scrollViewItemType",out oldItemType, "") && newItemType.Equals(oldItemType)) //if(true == utilsTools.getUserData<string>(itemObject, "scrollViewItemType",out oldItemType, "") && newItemType.Equals(oldItemType))
{ {
back(itemObject, i, ListViewBackTypeEnum.update); back(itemObject, i, ListViewBackTypeEnum.update);
continue; continue;
...@@ -212,37 +163,28 @@ public class gridView : MonoBehaviour ...@@ -212,37 +163,28 @@ public class gridView : MonoBehaviour
childTransform.SetParent(null); childTransform.SetParent(null);
GameObject.Destroy(childTransform.gameObject); GameObject.Destroy(childTransform.gameObject);
} }
itemObject = Instantiate(dicts[newItemType].Item2); itemObject = Instantiate(listItem);
utilsTools.setUserData(itemObject, "scrollViewItemType", ""); utilsTools.setUserData(itemObject, "scrollViewItemType", "");
itemObject.name = name; itemObject.name = name;
itemObject.transform.SetParent(gameObjectContext.transform); itemObject.transform.SetParent(gameObjectContext.transform);
back(itemObject, i, ListViewBackTypeEnum.create); back(itemObject, i, ListViewBackTypeEnum.create);
} }
for (int i = size; i < 100000000; i++) //for (int i = size; i < 100000000; i++)
{ //{
string name = $"auto_title_{i}"; // string name = $"auto_title_{i}";
var childTransform = gameObjectContext.transform.Find(name); // var childTransform = gameObjectContext.transform.Find(name);
if (childTransform == null) // if (childTransform == null)
{ // {
break; // break;
} // }
childTransform.SetParent(null); // childTransform.SetParent(null);
GameObject.Destroy(childTransform.gameObject); // GameObject.Destroy(childTransform.gameObject);
} //}
} }
//只支持一个预制体 //只支持一个预制体
virtual public void setDataNoGrid(int size,float widthItem,float heightItem,float interval,gradViewBack back, bool useVec = true, GetGradViewInfo getGradViewInfo = null,float offset1 = 0.0f) virtual public void setDataNoGrid(int size,float widthItem,float heightItem,float interval,gradViewBack back, bool useVec = true, GetGradViewInfo getGradViewInfo = null,float offset1 = 0.0f)
{ {
//Vector2 shipei = new Vector2 (widthItem,heightItem);
//utilsTools.DeviceAdaptationSize(ref shipei);
//widthItem = shipei.x;
//heightItem = shipei.y;
//shipei.x = interval;
//shipei.y = offset1;
//utilsTools.DeviceAdaptationSize(ref shipei);
//interval = shipei.x;
//offset1 = shipei.y;
if (perfabPaths.Count == 0) if (perfabPaths.Count == 0)
{ {
perfabPaths.Add(perfabPath); perfabPaths.Add(perfabPath);
...@@ -260,8 +202,6 @@ public class gridView : MonoBehaviour ...@@ -260,8 +202,6 @@ public class gridView : MonoBehaviour
} }
dicts.Add(key, new Tuple<string, GameObject>(item, Resources.Load<GameObject>(item))); dicts.Add(key, new Tuple<string, GameObject>(item, Resources.Load<GameObject>(item)));
} }
var rectTransform = gameObjectContext.GetComponent<RectTransform>();
List<Tuple<string, float>> infos = new List<Tuple<string, float>>(); List<Tuple<string, float>> infos = new List<Tuple<string, float>>();
float coutPixel = 0; float coutPixel = 0;
...@@ -290,42 +230,9 @@ public class gridView : MonoBehaviour ...@@ -290,42 +230,9 @@ public class gridView : MonoBehaviour
infos.Add(new Tuple<string, float>(itemKey, itemHeight)); infos.Add(new Tuple<string, float>(itemKey, itemHeight));
} }
} }
float startX = 0;
float startY = 0;
Vector3 vector3 = new Vector3(0, -120, 1); Vector3 vector3 = new Vector3(0, -120, 1);
RectTransform rectTransform1 = GetComponent<RectTransform>();
if (useVec)
{
float h = rectTransform1.rect.y;
startY = 0 - h / 2 + heightItem / 2 - (heightItem / 2 + interval / 2);
vector3.x = 0 - rectTransform.sizeDelta.x / 2 - offset1;
float spacingLen =interval * (size - 1);
float height = coutPixel;
if (height > h)
{
h = height;
}
rectTransform.sizeDelta = new Vector2(rectTransform.sizeDelta.x, h);
}
else
{
float w = rectTransform1.rect.width;
vector3.y = 0 - rectTransform.sizeDelta.y / 2 - offset1;//0 - rectTransform.sizeDelta.y / 2 - offset1;
startX = 0 - w / 2 + widthItem / 2 - (widthItem / 2 + interval / 2);
float spacingLen = interval * (size - 1);
float width = coutPixel;
//if (width > w)
//{
// w = width - w;
//}
//if (w > gameObject.GetComponent<RectTransform>().sizeDelta.x)
// rectTransform.sizeDelta = new Vector2(w, rectTransform.sizeDelta.y);
rectTransform.sizeDelta = new Vector2(width - w, rectTransform.sizeDelta.y);
}
utilsTools.setGDataByKey("listViewTempCellSize", new Vector2(widthItem,heightItem)); utilsTools.setGDataByKey("listViewTempCellSize", new Vector2(widthItem,heightItem));
utilsTools.setGDataByKey("listViewContextCellSize", rectTransform.sizeDelta);
Vector3 vector31 = new Vector3(); Vector3 vector31 = new Vector3();
Quaternion quaternion = new Quaternion(); Quaternion quaternion = new Quaternion();
for (int i = 0; i < size; i++) for (int i = 0; i < size; i++)
......
...@@ -64,8 +64,8 @@ public class homeImageGridView : gridView ...@@ -64,8 +64,8 @@ public class homeImageGridView : gridView
public void setData(int size, gradViewBack back, GetGradViewInfo getGradViewInfo) public void setData(int size, gradViewBack back, GetGradViewInfo getGradViewInfo)
{ {
setData(size, back, true, getGradViewInfo); setData(size, back, true, getGradViewInfo);
GameObject gameObjectContext = GetComponent<ScrollRect>().content.gameObject; //GameObject gameObjectContext = GetComponent<ScrollRect>().content.gameObject;
gameObjectContext.GetComponent<GridLayoutGroup>().SetLayoutVertical(); //gameObjectContext.GetComponent<GridLayoutGroup>().SetLayoutVertical();
} }
public void swapLoadData(int tagId,bool isNowShow) public void swapLoadData(int tagId,bool isNowShow)
{ {
......
...@@ -1120,29 +1120,6 @@ public class mainGameView : MonoBehaviour //大图的处理、具体的玩法 ...@@ -1120,29 +1120,6 @@ public class mainGameView : MonoBehaviour //大图的处理、具体的玩法
// if (scal.x < 1) // if (scal.x < 1)
// scal = Vector3.one; // scal = Vector3.one;
// transform.localScale = scal; // transform.localScale = scal;
//}
//if (Input.GetMouseButton(0)) //暂时先这样实现编辑器里的鼠标拖动
//{
// if (flag)
// {
// mouse_oldpos = mouse_nowpos;
// mouse_nowpos = Input.mousePosition;
// var pos_x = mouse_nowpos.x - mouse_oldpos.x;
// var pos_y=mouse_nowpos.y- mouse_oldpos.y;
// transform.localPosition = new Vector3(transform.localPosition.x + pos_x, transform.localPosition.y + pos_y, 0);
// }
// else
// {
// mouse_oldpos = Input.mousePosition;
// }
// mouse_nowpos = Input.mousePosition;
// flag = true;
//} //}
if (Input.GetMouseButtonUp(0)) if (Input.GetMouseButtonUp(0))
{ {
...@@ -1423,23 +1400,41 @@ public class mainGameView : MonoBehaviour //大图的处理、具体的玩法 ...@@ -1423,23 +1400,41 @@ public class mainGameView : MonoBehaviour //大图的处理、具体的玩法
//查找 //查找
utilsTools.addTimer_Sec(gameObject, "autoFill", (string _) => utilsTools.addTimer_Sec(gameObject, "autoFill", (string _) =>
{ {
for(int i = 0;i < 2; i++) #region 以前的
//for(int i = 0;i < 2; i++)
//{
// short aid = aids[idx];
// var infos = gameidJsondata.getAid(aid);
// if(infos.gid.Equals(nowSelectgid) == false)
// {
// short gid = infos.gid;
// utilsTools.sendEventObjectParams("removeGroupByGid", nowSelectgid,gid);
// }
// showAreaByPos(infos.px, infos.py, null, true);
// idx++;
// if (idx.Equals(aidsLen))
// {
// utilsTools.setGDataByKey("enableZoomMove", true);
// utilsTools.setGDataByKey("autoFillColor", false);
// return false;
// }
//}
#endregion
short aid = aids[idx];
var infos = gameidJsondata.getAid(aid);
if (infos.gid.Equals(nowSelectgid) == false)
{ {
short aid = aids[idx]; short gid = infos.gid;
var infos = gameidJsondata.getAid(aid); utilsTools.sendEventObjectParams("removeGroupByGid", nowSelectgid, gid);
if(infos.gid.Equals(nowSelectgid) == false) }
{ showAreaByPos(infos.px, infos.py, null, true);
short gid = infos.gid; idx++;
utilsTools.sendEventObjectParams("removeGroupByGid", nowSelectgid,gid); if (idx.Equals(aidsLen))
} {
showAreaByPos(infos.px, infos.py, null, true); utilsTools.setGDataByKey("enableZoomMove", true);
idx++; utilsTools.setGDataByKey("autoFillColor", false);
if (idx.Equals(aidsLen)) return false;
{
utilsTools.setGDataByKey("enableZoomMove", true);
utilsTools.setGDataByKey("autoFillColor", false);
return false;
}
} }
return true; return true;
}, 0.8, 10); }, 0.8, 10);
......
...@@ -20,40 +20,28 @@ public class colorItem : MonoBehaviour ...@@ -20,40 +20,28 @@ public class colorItem : MonoBehaviour
public int index = 0; public int index = 0;
public float selectLang = 0.05f; public float selectLang = 0.05f;
public Image Image_DI;
public Image Image_Jindu;
private int gID; private int gID;
public int GID //组ID public int GID //组ID
{ {
get { return gID; } get { return gID; }
set { gID = value; } set { gID = value; }
} }
private gameGroupEffect effectImg = null;
private Vector3 normalScale = Vector3.one;
private List<Vector2> initScaleSize = new List<Vector2>(); private List<Vector2> initScaleSize = new List<Vector2>();
private float offset = 0;
private Vector3 LocalPos_Root;//记录实例化出来后在本地的原始坐标 private Vector3 LocalPos_Root;//记录实例化出来后在本地的原始坐标
void initMember() private Material mat;
{
if (effectImg == null) public bool CanPlayAniFlag;
{
Vector2 listViewTempCellSize = utilsTools.getGDataByKey<Vector2>("listViewTempCellSize", Vector2.zero);
Vector2 listViewContextCellSize = utilsTools.getGDataByKey<Vector2>("listViewContextCellSize", Vector2.zero);
offset = (listViewContextCellSize.y - listViewTempCellSize.y) / 2f;
effectImg = transform.Find("circle").GetComponent<gameGroupEffect>();
transform.localScale = Vector3.one * 0.8f;
}
}
public bool IsSelect public bool IsSelect
{ {
set { set {
initMember();
isSelect = value; isSelect = value;
effectImg.LangValue = isSelect ? selectLang : 0;
effectImg.pause = !isSelect;
//transform.Find("finish").gameObject.SetActive(!value); //transform.Find("finish").gameObject.SetActive(!value);
//transform.Find("minBar").gameObject.SetActive(value); //transform.Find("minBar").gameObject.SetActive(value);
transform.Find("nowSelectFlg").gameObject.SetActive(isSelect); transform.Find("nowSelectFlg").gameObject.SetActive(isSelect);
...@@ -70,42 +58,15 @@ public class colorItem : MonoBehaviour ...@@ -70,42 +58,15 @@ public class colorItem : MonoBehaviour
} }
public void switchPlayAnimation() public void switchPlayAnimation()
{ {
if (transform == null) return;
RectTransform rectTransform = (RectTransform)transform;
float x = transform.localPosition.x;
//if (isSelect)
//{
// transform.localPosition = new Vector2(x, 0 - (transform.localScale.y * rectTransform.rect.height) / 2 - offset);
// transform.localScale = normalScale;
// ActionManages.addMoveByScale(gameObject, normalScale * 1.2f, 0.25f);
//}
//else
//{
// transform.localScale = normalScale * 1.2f;
// transform.localPosition = new Vector2(x, 0 - (transform.localScale.y * rectTransform.rect.height) / 2 - offset);
// ActionManages.addMoveByScale(gameObject, normalScale, 0.25f);
//}
if (isSelect) if (isSelect)
{ {
transform.DOScale(Vector3.one*0.95f, 0.5f); transform.DOScale(Vector3.one*0.95f, 0.5f).onComplete=()=> { CanPlayAniFlag = true; };
} }
else else
{ {
transform.DOScale(Vector3.one * 0.8f, 0.5f); transform.DOScale(Vector3.one * 0.8f, 0.5f).onComplete = () => { CanPlayAniFlag = false; }; ;
} }
//ActionManages.addCallBackByLen(gameObject, 1000, 0.25f, (float _) =>
//{
// //transform.localPosition = new Vector2(x, 0 - (transform.localScale.y * rectTransform.rect.height) / 2 - offset);
// rectTransform.anchoredPosition = new Vector2(rectTransform.anchoredPosition.x, 0);
//}, (GameObject gobject, int id) =>
//{
// //float a = transform.localScale.y * rectTransform.rect.height;
// //transform.localPosition = new Vector2(x, 0 - (transform.localScale.y * rectTransform.rect.height) / 2 - offset);
// rectTransform.anchoredPosition = new Vector2(rectTransform.anchoredPosition.x, 0);
//});
} }
public void switchPlayAnimation1() public void switchPlayAnimation1()
{ {
...@@ -149,7 +110,6 @@ public class colorItem : MonoBehaviour ...@@ -149,7 +110,6 @@ public class colorItem : MonoBehaviour
public float NowProgress public float NowProgress
{ {
set { set {
initMember();
if (value <= 0) if (value <= 0)
value = 0f; value = 0f;
else if (value >= 0.99999998) else if (value >= 0.99999998)
...@@ -161,15 +121,15 @@ public class colorItem : MonoBehaviour ...@@ -161,15 +121,15 @@ public class colorItem : MonoBehaviour
nowProgress = value; nowProgress = value;
bool isend = this.isFinish(); bool isend = this.isFinish();
//effectImg.Height = 1.0f - nowProgress; //effectImg.Height = 1.0f - nowProgress;
effectImg.Height = nowProgress; //effectImg.Height = nowProgress;
transform.Find("idname").gameObject.SetActive(!isend);
if (isend) if (mat == null)
{
effectImg.gameObject.SetActive(false);
}
else
{ {
CreateMat();
} }
Image_Jindu.material.SetFloat("progress", nowProgress);
transform.Find("idname").gameObject.SetActive(!isend);
} }
get get
{ {
...@@ -189,7 +149,6 @@ public class colorItem : MonoBehaviour ...@@ -189,7 +149,6 @@ public class colorItem : MonoBehaviour
{ {
set set
{ {
initMember();
useColor = value; useColor = value;
float h; float h;
float s; float s;
...@@ -217,22 +176,29 @@ public class colorItem : MonoBehaviour ...@@ -217,22 +176,29 @@ public class colorItem : MonoBehaviour
s = s / 100f; s = s / 100f;
v = v / 100f; v = v / 100f;
Color color1 = Color.HSVToRGB(h, s, v); Color color1 = Color.HSVToRGB(h, s, v);
effectImg.color2 = color1;
effectImg.color1 = useColor; Image_DI.color = color1;
if (mat == null)
{
CreateMat();
}
Image_Jindu.material.SetColor("color1", UseColor);
Image_Jindu.material.SetColor("color2", new Color(color1.r, color1.g - 0.1f, color1.b - 0.1f, color1.a));
} }
get get
{ {
return useColor; return useColor;
} }
} }
// Start is called before the first frame update
void Start() public void CreateMat()
{ {
initMember(); mat = Image_Jindu.material;
//IsSelect = isSelect; mat = Instantiate(mat);
//IdName = idName; Image_Jindu.material = mat;
//UseColor = useColor; transform.localScale = Vector3.one * 0.8f;
//NowProgress = nowProgress;
} }
public bool isFinish() public bool isFinish()
...@@ -241,18 +207,17 @@ public class colorItem : MonoBehaviour ...@@ -241,18 +207,17 @@ public class colorItem : MonoBehaviour
} }
public void onClickAreaGroup() public void onClickAreaGroup()
{ {
if (isSelect == false && isFinish() == false) //if (isSelect == false && isFinish() == false)
{ {
if (utilsTools.getGDataByKey<bool>("autoFillColor", false)) return; if (utilsTools.getGDataByKey<bool>("autoFillColor", false)) return;
utilsTools.sendEventObjectParams("switchGameAreaGroupId", index); utilsTools.sendEventObjectParams("switchGameAreaGroupId", index);
} }
}
public void updateOneUI() if (CanPlayAniFlag)
{ {
effectImg.updateTexture(); var nowscale = transform.localScale;
} transform.DOScale(transform.localScale * 0.9f, 0.1f).onComplete = () => { transform.DOScale(nowscale, 0.1f); };
public void resetSize(float x,float y) }
{
} }
public void SetLocalRootPos() //保存一下第一个的原始坐标 public void SetLocalRootPos() //保存一下第一个的原始坐标
...@@ -269,15 +234,19 @@ public class colorItem : MonoBehaviour ...@@ -269,15 +234,19 @@ public class colorItem : MonoBehaviour
//if (clickindex - 1 > index) //if (clickindex - 1 > index)
// return; // return;
//transform.DOLocalMoveX(clickpos - 120 * (clickindex - index) - 5, 0.5f); //transform.DOLocalMoveX(clickpos - 120 * (clickindex - index) - 5, 0.5f);
transform.DOLocalMoveX(LocalPos_Root.x + index * 120, 0.5f); transform.DOLocalMoveX(LocalPos_Root.x + index * 120, 0.3f);
} }
else else
{ {
transform.DOLocalMoveX(clickpos + 120 * (index - clickindex) + offset_dis, 0.5f); transform.DOLocalMoveX(clickpos + 120 * (index - clickindex) + offset_dis, 0.3f);
//transform.DOLocalMoveX(LocalPos_Root.x + 120 * index + offset_dis, 0.5f); //transform.DOLocalMoveX(LocalPos_Root.x + 120 * index + offset_dis, 0.5f);
} }
} }
public void ReSetPos()
{
transform.DOLocalMoveX(LocalPos_Root.x + index * 120, 0.1f);
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment