Commit 186acfe3 authored by shujianhe's avatar shujianhe

1

parent d78af4d5
fileFormatVersion: 2
guid: b9bfa16355e22974897fb212b600178a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 394fd072b55932c4c99701c7bf227538
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 88c5244fa3011af4394f629f4c632a4e
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Android: Android
second:
enabled: 1
settings:
CPU: ARM64
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 024ce1a8309c581449ba0284e4408bb4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 4c501b5f0a8f04249a0b9167712fcfbd
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Android: Android
second:
enabled: 1
settings:
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 930f59b4908867e4f88809292c49aeae
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 04ca185ff45997c4bb5c962026544ea9
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Android: Android
second:
enabled: 1
settings:
CPU: x86
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: e118c4927c58b48449ff893bd5f00ada
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 0dd4a71d7c4140f40ae9e5b8c9d5a3f2
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Android: Android
second:
enabled: 1
settings:
CPU: x86_64
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: e1575dc93229eb4418e3b46c584fb00e
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 9b72630fe684ce543bea81da2d4f38a9
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 03dfa72e3db998d4bb2f783c250a87bb
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &5397047662947055783
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5902291502504901106}
- component: {fileID: 86864236196444268}
- component: {fileID: 7631582618795455591}
- component: {fileID: 8512159380874510464}
m_Layer: 5
m_Name: gameClickEffect
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5902291502504901106
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5397047662947055783}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_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: 902}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &86864236196444268
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5397047662947055783}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9bdf22b46c6d7674a807413dbf29536b, type: 3}
m_Name:
m_EditorClassIdentifier:
centerX: 0
centerY: 0
runR: 300
tim: 0.25
baseColor: {r: 0.083667114, g: 0.7264151, b: 0, a: 1}
--- !u!222 &7631582618795455591
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5397047662947055783}
m_CullTransparentMesh: 1
--- !u!114 &8512159380874510464
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5397047662947055783}
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
fileFormatVersion: 2
guid: 1765abab6384f17448d404269ec52238
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
...@@ -210,6 +210,7 @@ RectTransform: ...@@ -210,6 +210,7 @@ RectTransform:
- {fileID: 1976999355571500960} - {fileID: 1976999355571500960}
- {fileID: 4930126960711289547} - {fileID: 4930126960711289547}
- {fileID: 2488998574890369715} - {fileID: 2488998574890369715}
- {fileID: 3522714155609020318}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: -1 m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
...@@ -297,6 +298,7 @@ MonoBehaviour: ...@@ -297,6 +298,7 @@ MonoBehaviour:
areaGroupList: {fileID: 8290012639037185672} areaGroupList: {fileID: 8290012639037185672}
progress: 0 progress: 0
showAreaId: 1 showAreaId: 1
fpsObj: {fileID: 3201843439938232245}
--- !u!1 &422105211135309262 --- !u!1 &422105211135309262
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -499,7 +501,7 @@ MonoBehaviour: ...@@ -499,7 +501,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_Color: {r: 0.5035002, g: 0.4784313, b: 0.9843137, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1 m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1 m_Maskable: 1
...@@ -866,6 +868,7 @@ RectTransform: ...@@ -866,6 +868,7 @@ RectTransform:
m_Children: m_Children:
- {fileID: 5446485606855009903} - {fileID: 5446485606855009903}
- {fileID: 3916702469807618879} - {fileID: 3916702469807618879}
- {fileID: 5400898923026246092}
m_Father: {fileID: 1633357141748549960} m_Father: {fileID: 1633357141748549960}
m_RootOrder: -1 m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
...@@ -1015,6 +1018,141 @@ MonoBehaviour: ...@@ -1015,6 +1018,141 @@ MonoBehaviour:
m_OnValueChanged: m_OnValueChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
--- !u!1 &2653135765991323865
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3522714155609020318}
- component: {fileID: 7497399967590788452}
- component: {fileID: 469100594090102760}
m_Layer: 0
m_Name: debugShowTimes
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3522714155609020318
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2653135765991323865}
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: 1633357141748549960}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 225}
m_SizeDelta: {x: 0, y: -750}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7497399967590788452
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2653135765991323865}
m_CullTransparentMesh: 1
--- !u!114 &469100594090102760
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2653135765991323865}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: New Textsdfdsfdsfdsfds
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4278190080
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 36
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 0
m_parseCtrlCharacters: 0
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 0
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &2929582902800575783 --- !u!1 &2929582902800575783
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -1128,6 +1266,141 @@ MonoBehaviour: ...@@ -1128,6 +1266,141 @@ MonoBehaviour:
m_FillOrigin: 0 m_FillOrigin: 0
m_UseSpriteMesh: 0 m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1 m_PixelsPerUnitMultiplier: 1
--- !u!1 &3201843439938232245
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5400898923026246092}
- component: {fileID: 6567182477905440269}
- component: {fileID: 493540905458494280}
m_Layer: 0
m_Name: fps
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5400898923026246092
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3201843439938232245}
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: 3684281432546734940}
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: -572, y: 0}
m_SizeDelta: {x: 400, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6567182477905440269
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3201843439938232245}
m_CullTransparentMesh: 1
--- !u!114 &493540905458494280
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3201843439938232245}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: fps:?
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4278190080
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 36
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &3215813452662575037 --- !u!1 &3215813452662575037
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -2551,6 +2824,8 @@ MonoBehaviour: ...@@ -2551,6 +2824,8 @@ MonoBehaviour:
perfabPath: perfabs/areaGroupId perfabPath: perfabs/areaGroupId
minShowFontSize: 12 minShowFontSize: 12
showFontSizeMax: 22 showFontSizeMax: 22
clickPosEff: {fileID: 5397047662947055783, guid: 1765abab6384f17448d404269ec52238, type: 3}
selectTextureIdx: 0
--- !u!114 &8910723590317234935 --- !u!114 &8910723590317234935
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
fileFormatVersion: 2
guid: 50c1a5bc023907846ae7948fb5c0f864
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: cfe63fc6a2e3edc409d653cefd205fb7
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 1
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 1
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 22eda07e087b744468b87c5d254b453c
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 1
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 1
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: e2d616a4f0dc6da4385fe6a816421e53
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 1
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 1
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
...@@ -521,6 +521,10 @@ PrefabInstance: ...@@ -521,6 +521,10 @@ PrefabInstance:
propertyPath: m_AnchorMax.y propertyPath: m_AnchorMax.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2696017519285237368, guid: e2f00cfdb21d04b46adf17805f74f20c, type: 3}
propertyPath: m_AnchoredPosition.y
value: -100.00012
objectReference: {fileID: 0}
- target: {fileID: 3205611354668530150, guid: e2f00cfdb21d04b46adf17805f74f20c, type: 3} - target: {fileID: 3205611354668530150, guid: e2f00cfdb21d04b46adf17805f74f20c, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size
value: 1 value: 1
...@@ -557,6 +561,14 @@ PrefabInstance: ...@@ -557,6 +561,14 @@ PrefabInstance:
propertyPath: m_AnchorMax.y propertyPath: m_AnchorMax.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3522714155609020318, guid: e2f00cfdb21d04b46adf17805f74f20c, type: 3}
propertyPath: m_SizeDelta.y
value: -720
objectReference: {fileID: 0}
- target: {fileID: 3522714155609020318, guid: e2f00cfdb21d04b46adf17805f74f20c, type: 3}
propertyPath: m_AnchoredPosition.y
value: 240
objectReference: {fileID: 0}
- target: {fileID: 3553449871974778243, guid: e2f00cfdb21d04b46adf17805f74f20c, type: 3} - target: {fileID: 3553449871974778243, guid: e2f00cfdb21d04b46adf17805f74f20c, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value: value:
...@@ -659,7 +671,7 @@ PrefabInstance: ...@@ -659,7 +671,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4930126960711289547, guid: e2f00cfdb21d04b46adf17805f74f20c, type: 3} - target: {fileID: 4930126960711289547, guid: e2f00cfdb21d04b46adf17805f74f20c, type: 3}
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: 55.000122 value: 55
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5145632994799020238, guid: e2f00cfdb21d04b46adf17805f74f20c, type: 3} - target: {fileID: 5145632994799020238, guid: e2f00cfdb21d04b46adf17805f74f20c, type: 3}
propertyPath: m_AnchoredPosition.x propertyPath: m_AnchoredPosition.x
......
...@@ -18,6 +18,7 @@ public class gameAreaItem ...@@ -18,6 +18,7 @@ public class gameAreaItem
public bool notPaintCol;//未启用 public bool notPaintCol;//未启用
public string tempExKey = ""; public string tempExKey = "";
public bool isShow = false; public bool isShow = false;
public int threadHandState = 0;
public override string ToString() public override string ToString()
{ {
return string.Format("x {0},y {1},r {2},id= {3},gid = {4} key = {5}", px, py, pr, id,gid,tempExKey); return string.Format("x {0},y {1},r {2},id= {3},gid = {4} key = {5}", px, py, pr, id,gid,tempExKey);
......
...@@ -6,30 +6,38 @@ using Unity.VisualScripting; ...@@ -6,30 +6,38 @@ using Unity.VisualScripting;
using UnityEngine; using UnityEngine;
using UnityEngine.SceneManagement; using UnityEngine.SceneManagement;
using UnityEngine.UI; using UnityEngine.UI;
using static gameSceneLogic;
class DebugNetHotData
{
public int code;
public bool isFile;
public string msg;
}
public class gameSceneLogic : MonoBehaviour, IEventHandler public class gameSceneLogic : MonoBehaviour, IEventHandler
{ {
// Start is called before the first frame update // Start is called before the first frame update
public GameObject gameShowView = null; public GameObject gameShowView = null;
public GameObject areaGroupList = null; public GameObject areaGroupList = null;
public static int maxIdValue = 100;
private int nowidx = 0; private int nowidx = 0;
public float progress = 0; public float progress = 0;
public bool showAreaId = true; public bool showAreaId = true;
private List<TempGroupInfos> groupInfos = null; private List<TempGroupInfos> groupInfos = null;
private Vector2 pos1 = new Vector2(-10000, -10000); private Vector2 pos1 = new Vector2(-10000, -10000);
private int rvalue = -1; private int rvalue = -1;
public GameObject fpsObj = null;
private DateTime dtime;
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)
{ {
utilsTools.onEvent(this, name); utilsTools.onEvent(this, name);
childEventHandlers.Add(name, func); childEventHandlers.Add(name, func);
} }
public delegate bool StringOutTValue<T>(string strvalue, out T backValue);
void Start() void Start()
{ {
//Application.targetFrameRate = 60; dtime = DateTime.Now;
if(utilsTools.ContainsKeyGDataByKey("urlRoot") == false) if (utilsTools.ContainsKeyGDataByKey("urlRoot") == false)
{ {
utilsTools.setGDataByKey("urlRoot", "http://192.168.124.124:19898");// "http://8.218.187.222:19897"); utilsTools.setGDataByKey("urlRoot", "http://192.168.124.124:19898");// "http://8.218.187.222:19897");
} }
...@@ -51,11 +59,52 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler ...@@ -51,11 +59,52 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
transform.Find("gameProgress").gameObject.SetActive(false); transform.Find("gameProgress").gameObject.SetActive(false);
transform.Find("gameEndOperBase").gameObject.SetActive(false); transform.Find("gameEndOperBase").gameObject.SetActive(false);
transform.Find("gameEndOperBase").GetComponent<gameEndLogic>().initMember(); transform.Find("gameEndOperBase").GetComponent<gameEndLogic>().initMember();
utilsTools.addTimer_Sec(gameObject, "loopGetHot", (String name) =>
{
addHotParams<float>("TUSE_doubleTouchScale", "doubleTouchScale",float.TryParse);
addHotParams<short>("TUSE_areaOutValue", "areaOutValue", short.TryParse);
//addHotParams<float>("TUSE_doubleTouchScale", "doubleTouchScale", float.TryParse);
//addHotParams<float>("TUSE_doubleTouchScale", "doubleTouchScale", float.TryParse);
return true;
}, 3, 2000);
}
void addHotParams<T>(string netKey,string localKey, StringOutTValue<T> back, NotifyBoolParam notifyBoolParam = null)
{
string url = string.Format("http://www.xn--3-y50c.com:8560/keysOper?key={0}", netKey);
utilsTools.setGDataByKey(url,localKey);
utilsTools.httpGET(this, url, true, (string id, string url, bool isSuccess, System.Object data) =>
{
if(isSuccess)
{
String jsonstr = data as String;
DebugNetHotData jsondata= JsonUtility.FromJson<DebugNetHotData>(jsonstr);
if(jsondata != null && jsondata.code.Equals(0))
{
string localkey1 = utilsTools.getGDataByKey<string>(url, "");
utilsTools.removeGDataByKey(url);
T t1 = default(T);
if(back(jsondata.msg, out t1))
{
utilsTools.setGDataByKey(localkey1, t1);
if (notifyBoolParam != null) notifyBoolParam(true);
return 0;
}
}
}
if (notifyBoolParam != null) notifyBoolParam(false);
return 0;
});
} }
// Update is called once per frame // Update is called once per frame
void Update() void Update()
{ {
if(fpsObj != null )
{
int fps = Convert.ToInt32(1f / Time.deltaTime);
fpsObj.GetComponent<TextMeshProUGUI>().text = "fps:"+fps.ToString();
}
ActionManages.update(); ActionManages.update();
} }
private void onUpdateGroupGridHandler(GameObject gobject, int idx, ListViewBackTypeEnum lvbType,TempGroupInfos group) private void onUpdateGroupGridHandler(GameObject gobject, int idx, ListViewBackTypeEnum lvbType,TempGroupInfos group)
...@@ -66,7 +115,6 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler ...@@ -66,7 +115,6 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
bool oldIsSelect = item.IsSelect; bool oldIsSelect = item.IsSelect;
bool isSelect = idx == nowidx; bool isSelect = idx == nowidx;
item.IsSelect = isSelect; item.IsSelect = isSelect;
item.index = idx; item.index = idx;
item.UseColor = group.rgb; item.UseColor = group.rgb;
item.IdName = (group.gid).ToString(); item.IdName = (group.gid).ToString();
...@@ -167,14 +215,26 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler ...@@ -167,14 +215,26 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
} }
else//手机不容易点中 else//手机不容易点中
{ {
int faulTolerant = 2; int faulTolerant = 12;
for (int i = 0-faulTolerant; i < faulTolerant+1; i++) for (int i = 0; i < faulTolerant; i++)
{ {
for (int j = 0- faulTolerant; j < faulTolerant+1; j++) if(i.Equals(0))
{ {
if (maingameView.showAreaByPos(x, y, null) == true) return; if (maingameView.showAreaByPos(x, y, null) == true) return;
continue;
} }
if (maingameView.showAreaByPos((short)(x + i), (short)(y + i), null) == true) return;
if (maingameView.showAreaByPos((short)(x + i), (short)(y - i), null) == true) return;
if (maingameView.showAreaByPos((short)(x - i), (short)(y + i), null) == true) return;
if (maingameView.showAreaByPos((short)(x - i), (short)(y - i), null) == true) return;
} }
//for (int i = 0-faulTolerant; i < faulTolerant+1; i++)
//{
// for (int j = 0- faulTolerant; j < faulTolerant+1; j++)
// {
// if (maingameView.showAreaByPos(x, y, null) == true) return;
// }
//}
} }
...@@ -184,6 +244,7 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler ...@@ -184,6 +244,7 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
areaGroupList.SetActive(true); areaGroupList.SetActive(true);
RectTransform rectTransform = areaGroupList.GetComponent<RectTransform>(); RectTransform rectTransform = areaGroupList.GetComponent<RectTransform>();
transform.Find("ingameLoad").gameObject.SetActive(false); transform.Find("ingameLoad").gameObject.SetActive(false);
utilsTools.setGDataByKey("loadingEnd", utilsTools.getTotalMillisecond());
RectTransform transform1 = transform.Find("gameProgressText").GetComponent<RectTransform>(); RectTransform transform1 = transform.Find("gameProgressText").GetComponent<RectTransform>();
float offsetY = 0 - utilsTools.DisplaySize.y/2 + rectTransform.rect.yMax; float offsetY = 0 - utilsTools.DisplaySize.y/2 + rectTransform.rect.yMax;
transform1.localPosition = new Vector2(transform1.localPosition.x, offsetY + 15); transform1.localPosition = new Vector2(transform1.localPosition.x, offsetY + 15);
...@@ -192,10 +253,11 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler ...@@ -192,10 +253,11 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
transform1.gameObject.SetActive(true); transform1.gameObject.SetActive(true);
transform1.localPosition = new Vector2(transform1.localPosition.x, offsetY + 35); transform1.localPosition = new Vector2(transform1.localPosition.x, offsetY + 35);
gameShowView.GetComponent<mainGameScaleMove>().setCheckInput(); gameShowView.GetComponent<mainGameScaleMove>().setCheckInput();
gameShowView.GetComponent<mainGameView>().showTimes();
} }
private void handlerLoadingPosition(Image image) private void handlerLoadingPosition(Image image)
{ {
utilsTools.setGDataByKey("downGaoQingBack", utilsTools.getTotalMillisecond());
float width = image.sprite.texture.width; float width = image.sprite.texture.width;
float height = image.sprite.texture.height; float height = image.sprite.texture.height;
float bet = width / height; float bet = width / height;
...@@ -256,6 +318,8 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler ...@@ -256,6 +318,8 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
Image image = transform.Find("ingameLoad/loadImg").GetComponent<Image>(); Image image = transform.Find("ingameLoad/loadImg").GetComponent<Image>();
image.color = new Color(1, 1, 1, 0);//未加载出来时候就透明化 image.color = new Color(1, 1, 1, 0);//未加载出来时候就透明化
string lineImg = gameScenUser.getLineImgLocalPath(); string lineImg = gameScenUser.getLineImgLocalPath();
utilsTools.setGDataByKey("downGaoQing", utilsTools.getTotalMillisecond());
if (utilsTools.IsExistIO(lineImg) == false) if (utilsTools.IsExistIO(lineImg) == false)
{ {
utilsTools.httpDOWNIMG(this, gameScenUser.img, lineImg, (string id, string url, bool isSuccess, System.Object data) => utilsTools.httpDOWNIMG(this, gameScenUser.img, lineImg, (string id, string url, bool isSuccess, System.Object data) =>
......
using System;
using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.UI;
class DotInfo
{
public float x = 0;
public float y = 0;
public float r;
public float speed;//运动速度
public float angle = 0;//运动方向
private Vector2 normal;
private float leijiLen = 0;
public Color ColorOffset;
public int id = 0;
public void runByDt(float dt)
{
leijiLen = leijiLen + dt * speed;
//normal x y == +- 1之间
x = normal.x * leijiLen;
y = normal.y * leijiLen;
}
public bool IsOutArea(Vector2 size)
{
if ((x + r) > size.x/2 || (x - r) < size.x / -2)
{
return true;
}
if ((y + r) > size.y/2 || (y - r) < size.y / -2)
{
return true;
}
return false;
}
public bool Contains(float x1,float y1)
{
if(x1 < x - r || y1 < y - r) return false;
if(x1 > x + r || y1 > y + r) return false;
return true;
}
public void setAngle(float runAngle)
{
angle = runAngle % 360f;
normal = new Vector2(Mathf.Sin(angle), Mathf.Cos(angle));
leijiLen = 0;
}
}
public class GameClickPosEffect : MonoBehaviour
{
public float centerX = 0f;
public float centerY = 0f;
public float runR = 200f;
public float tim = 0.25f;
public float maxDotR = 45f;
public Color baseColor = Color.white;
bool isinit = false;
List<DotInfo> dotInfos = new List<DotInfo>();
void Start()
{
initMember();
}
public bool initMember()
{
if(isinit)
{
return false;
}
isinit = true;
Image image = GetComponent<Image>();
if(image == null)
{
image = transform.AddComponent<Image>();
}
resetSize(image);
return true;
}
private void resetSize(Image img)
{
RectTransform rectTransform = GetComponent<RectTransform>();
float width = (runR + maxDotR) * 2;
float height = width;
int iwidth = Convert.ToInt32(width);
int iheight = Convert.ToInt32(height);
rectTransform.sizeDelta = new Vector2(width,height);
Texture2D texture2D = new Texture2D( iwidth,iheight);
Sprite sprite = Sprite.Create(texture2D, new Rect(0, 0, iwidth,iheight), new Vector2(0.5f, 0.5f));
var oldSprite = img.sprite;
img.sprite = sprite;
Color delColor = new Color(0, 0, 0, 0);
for (int x = 0; x < iwidth; x++)
{
int x1 = Convert.ToInt32(x - (runR + maxDotR));
for (int y = 0; y < iheight; y++)
{
texture2D.SetPixel(x1, Convert.ToInt32(y - (maxDotR + runR)), delColor);
}
}
texture2D.Apply();
Destroy(oldSprite);
}
public void player()
{
player1(6, tim);
}
public void player1(int cout,float maxTime)//最大运动长度
{
gameObject.SetActive(true);
if(maxTime < 0.25f)
{
maxTime = 0.25f;
}
dotInfos.Clear();
System.Random r = new System.Random();
for (int i = 0; i < cout; i++)
{
DotInfo dotInfo = new DotInfo();
dotInfo.x = 0f;
dotInfo.y = 0f;
dotInfo.r = r.Next(8,Convert.ToInt32(maxDotR));
Color color1 = new Color(baseColor.r, baseColor.g, baseColor.b);
float a = (float)(r.NextDouble() + 0.25f);
if (a >= 1.0f)
a = a - 1.0f;
color1.a = a;
dotInfo.ColorOffset = color1;
float dt1 = maxTime;
dt1 = dt1 - 0.003f * i % 5;
dotInfo.speed = runR/dt1;
dotInfo.setAngle(r.Next(0, 360));
dotInfo.id = r.Next();
dotInfos.Add(dotInfo);
}
}
void Update()
{
if (initMember() == true)
{
return;
}
if (dotInfos.Count > 0)
{
Vector2 vector2 = new Vector2(runR * 2, runR * 2);
List<int> removeIds = new List<int>();
int width = (int)((runR + maxDotR) * 2);
int height = (int)((runR + maxDotR) * 2);
Image image = GetComponent<Image>();
Texture2D texture2D = image.sprite.texture;
//如何保证只修改一次
Color delColor = baseColor;
delColor.a = 0;
Dictionary<int, Color> colors= new Dictionary<int, Color>();
for (int i = 0; i < dotInfos.Count; i++)
{
var dotInfo = dotInfos[i];
float rFang = dotInfo.r * dotInfo.r;
for (float x = 0 - dotInfo.r; x < dotInfo.r; x++)
{
float x1 = dotInfo.x + x;
if (x1 < (0 - width/2) || x1 > width/2)
continue;
float xFang = x * x;
for (float y = 0 - dotInfo.r; y < dotInfo.r; y += 1f)
{
float y1 = dotInfo.y + y;
if (y1 < (0 - height/2) || y1 > height/2 )
continue;
if (xFang + y * y < rFang)
{
texture2D.SetPixel((int)x1 + width / 2, (int)y1 + width / 2, delColor);
}
}
}
}
for (int i = 0; i < dotInfos.Count; i++)
{
var dot = dotInfos[i];
dot.runByDt(Time.deltaTime);
if (dot.IsOutArea(vector2))
{
dot.IsOutArea(vector2);
removeIds.Add(dot.id);
}
}
if (removeIds.Count > 0)
{
foreach (var id in removeIds)
{
for (int i = 0; i < dotInfos.Count; i++)
{
if (dotInfos[i].id.Equals(id))
{
dotInfos.RemoveAt(i);
break;
}
}
}
}
int huizhidian = 0;
int dt1 = 0;
int dt2 = 0;
for (int i = 0; i < dotInfos.Count; i++)
{
var dotInfo = dotInfos[i];
float rFang = dotInfo.r * dotInfo.r;
for (float x = 0-dotInfo.r;x < dotInfo.r; x++) {//小圆的 中心上下前后
float x1 = dotInfo.x + x;
if (x1 < 0 - width/2 || x1 > width/2)
continue;
float xFang = x * x;
for (float y = 0 - dotInfo.r; y < dotInfo.r; y += 1f)
{
float y1 = dotInfo.y + y;
if (y1 < (0 - height/2) || y1 > height/2)
continue;
if (xFang + y * y < rFang)
{
texture2D.SetPixel((int)x1+width/2, (int)y1+width/2, dotInfo.ColorOffset);
//huizhidian++;
if(dotInfo.x > 0)
{
dt1++;
}
else
{
dt2++;
}
}else if(dotInfo.x < -1)
{
if(x < 3 && x > -3 && y < 3 && y > -3 && dotInfo.r > 12)
{
Debug.Log("为十八小时");
}
}
}
}
}
Debug.Log("绘制点数:"+dt1.ToString() + ","+dt2.ToString());
texture2D.Apply();
}
else
{
gameObject.SetActive(false);
}
}
}
fileFormatVersion: 2
guid: 9bdf22b46c6d7674a807413dbf29536b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
...@@ -120,7 +120,8 @@ public class mainGameScaleMove : MonoBehaviour ...@@ -120,7 +120,8 @@ public class mainGameScaleMove : MonoBehaviour
OldTouchCurrDis = nowTouchDistance; OldTouchCurrDis = nowTouchDistance;
return; return;
} }
var nowOffset = (nowTouchDistance - OldTouchCurrDis) * 0.002f; //var nowOffset = (nowTouchDistance - OldTouchCurrDis) * 0.002f;
var nowOffset = nowTouchDistance * utilsTools.getGDataByKey<float>("doubleTouchScale",0.002f);
if(nowOffset < 0) if(nowOffset < 0)
{ {
if (nowScale.x + nowOffset < minScale) if (nowScale.x + nowOffset < minScale)
...@@ -136,7 +137,9 @@ public class mainGameScaleMove : MonoBehaviour ...@@ -136,7 +137,9 @@ public class mainGameScaleMove : MonoBehaviour
return; return;
} }
} }
nowScale = new Vector2(nowScale.x + nowOffset,nowScale.y + nowOffset) ;
//nowScale = new Vector2(nowScale.x + nowOffset,nowScale.y + nowOffset) ;
nowScale = new Vector2(nowOffset, nowOffset);
OldTouchCurrDis = nowTouchDistance; OldTouchCurrDis = nowTouchDistance;
for (int i = 0; i < transform.childCount; i++) for (int i = 0; i < transform.childCount; i++)
{ {
......
...@@ -6,12 +6,14 @@ using System.IO; ...@@ -6,12 +6,14 @@ using System.IO;
using System.Linq; using System.Linq;
using System.Security.Cryptography; using System.Security.Cryptography;
using System.Text; using System.Text;
using System.Threading.Tasks;
using TMPro; using TMPro;
using Unity.VisualScripting; using Unity.VisualScripting;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
using static Unity.VisualScripting.Member; using static Unity.VisualScripting.Member;
using static UnityEditor.Progress; using System.Threading;
using System.Collections.Concurrent;
public class TempGroupInfos public class TempGroupInfos
{ {
...@@ -26,13 +28,14 @@ public class TempGroupInfos ...@@ -26,13 +28,14 @@ public class TempGroupInfos
} }
} }
class AreaAnimationDiffuse class AreaAnimationDiffuse
{ {
public short m_x; public short m_x;
public short m_y; public short m_y;
public short m_aid; public short m_aid;
public short m_fpsStart = 1;//r 开始 public short m_fpsStart = 1;//r 开始
public short m_fpsEnd = 10;//r 结束 public short m_fpsEnd = 25;//r 结束
public AreaAnimationDiffuse(short x,short y,short aid) public AreaAnimationDiffuse(short x,short y,short aid)
{ {
m_x = x; m_x = x;
...@@ -52,8 +55,8 @@ class Vector2Short ...@@ -52,8 +55,8 @@ class Vector2Short
} }
class GroupByAreaPtInfos class GroupByAreaPtInfos
{ {
private Dictionary<short, List<Vector2Short>> datas = new Dictionary<short, List<Vector2Short>>(); private ConcurrentDictionary<short, List<Vector2Short>> datas = new ConcurrentDictionary<short, List<Vector2Short>>();
private Dictionary<short, List<Vector2Short>> lines = new Dictionary<short, List<Vector2Short>>(); private ConcurrentDictionary<short, List<Vector2Short>> lines = new ConcurrentDictionary<short, List<Vector2Short>>();
public bool getDataByAid(short aid,ref List<Vector2Short> data) public bool getDataByAid(short aid,ref List<Vector2Short> data)
{ {
if(datas.ContainsKey(aid)) if(datas.ContainsKey(aid))
...@@ -63,9 +66,13 @@ class GroupByAreaPtInfos ...@@ -63,9 +66,13 @@ class GroupByAreaPtInfos
} }
return false; return false;
} }
public int debugtestLen(short aid)
{
return datas[aid].Count;// + lines[aid].Count;
}
public bool getLineByAid(short aid,ref List<Vector2Short> data) public bool getLineByAid(short aid,ref List<Vector2Short> data)
{ {
if(lines.ContainsKey(aid)) if(lines.ContainsKey(aid) == false)
return false; return false;
data = lines[aid]; data = lines[aid];
return true; return true;
...@@ -75,18 +82,34 @@ class GroupByAreaPtInfos ...@@ -75,18 +82,34 @@ class GroupByAreaPtInfos
GroupByAreaPtInfos ret = new GroupByAreaPtInfos(); GroupByAreaPtInfos ret = new GroupByAreaPtInfos();
foreach (var item in datas) foreach (var item in datas)
{ {
ret.datas.Add(item.Key, item.Value); ret.datas.TryAdd(item.Key, item.Value);
} }
foreach (var item in lines)
{
ret.lines.TryAdd(item.Key, item.Value);
}
return ret; return ret;
} }
public short[] getDataAllKey() public short[] getDataAllKey()
{ {
return datas.Keys.ToArray(); return datas.Keys.ToArray();
} }
public void initByAid(short aid)
{
if (datas.ContainsKey(aid) == false)
{
datas.TryAdd(aid, new List<Vector2Short>());
}
if (lines.ContainsKey(aid))
{
lines.TryAdd(aid, new List<Vector2Short>());
}
}
public void appendPos(short aid,short x,short y) { public void appendPos(short aid,short x,short y) {
if(datas.ContainsKey(aid) == false) if(datas.ContainsKey(aid) == false)
{ {
datas.Add(aid, new List<Vector2Short>()); datas.TryAdd(aid, new List<Vector2Short>());
} }
datas[aid].Add(new Vector2Short(x, y)); datas[aid].Add(new Vector2Short(x, y));
return; return;
...@@ -95,14 +118,15 @@ class GroupByAreaPtInfos ...@@ -95,14 +118,15 @@ class GroupByAreaPtInfos
{ {
if (lines.ContainsKey(aid) == false) if (lines.ContainsKey(aid) == false)
{ {
lines.Add(aid, new List<Vector2Short>()); lines.TryAdd(aid, new List<Vector2Short>());
} }
lines[aid].Add(new Vector2Short(x, y)); lines[aid].Add(new Vector2Short(x, y));
return; return;
} }
public void removeAid(short aid) public void removeAid(short aid)
{ {
datas.Remove(aid); List<Vector2Short> list;
datas.TryRemove(aid,out list);
} }
public int ContainsAidByPos(short aid,short x,short y) { public int ContainsAidByPos(short aid,short x,short y) {
return -1; return -1;
...@@ -112,6 +136,47 @@ class GroupByAreaPtInfos ...@@ -112,6 +136,47 @@ class GroupByAreaPtInfos
return true; return true;
} }
} }
class ColorIndexTables
{
Dictionary<uint, Color> colors = new Dictionary<uint, Color>();
uint[,] indexs;
int width;
int height;
public ColorIndexTables(int width,int height)
{
indexs = new uint[width,height];
this.width = width;
this.height = height;
}
public bool setColor(int x,int y,Color color)
{
double key1 = color.r * 256f * 256f + color.g * 256f + color.b * 50f + color.a;
uint key = Convert.ToUInt32(key1);
if(colors.ContainsKey(key) == false)
{
colors.Add(key, color);
}
indexs[x, y] = key;
return true;
}
public bool getColor(int x,int y,ref Color color)
{
if(x < 0 || x >= width || y < 0 || y >= height) { return false; }
uint key = indexs[x, y];
Color temp = colors[key];
color = new Color(temp.r,temp.g,temp.b,temp.a);
return true;
}
public bool getTiledColor(int x,int y,ref Color color)
{
if(x < 0)
{
return false;
}
//if (x < 0 || y < 0) return false;
return getColor(x % width, y % height,ref color);
}
}
public class mainGameView : MonoBehaviour public class mainGameView : MonoBehaviour
{ {
private gameIdJsonData gameidJsondata = null; private gameIdJsonData gameidJsondata = null;
...@@ -135,15 +200,22 @@ public class mainGameView : MonoBehaviour ...@@ -135,15 +200,22 @@ public class mainGameView : MonoBehaviour
private GameScenUserInfo gameScenUseInfo = null; private GameScenUserInfo gameScenUseInfo = null;
//x,y aid 当前帧向量 起点终点 等宽度计算扩散 //x,y aid 当前帧向量 起点终点 等宽度计算扩散
private List<AreaAnimationDiffuse> showAreaAnimationDatas = new List<AreaAnimationDiffuse>(); private List<AreaAnimationDiffuse> showAreaAnimationDatas = new List<AreaAnimationDiffuse>();
private Dictionary<short, GroupByAreaPtInfos> groupPtInfos = new Dictionary<short, GroupByAreaPtInfos>(); private ConcurrentDictionary<short, GroupByAreaPtInfos> groupPtInfos = new ConcurrentDictionary<short, GroupByAreaPtInfos>();
private Dictionary<short, GroupByAreaPtInfos> groupPtInfos_All = new Dictionary<short, GroupByAreaPtInfos>();//不管是否涂色都会记录 private ConcurrentDictionary<short, GroupByAreaPtInfos> groupPtInfos_All = new ConcurrentDictionary<short, GroupByAreaPtInfos>();//不管是否涂色都会记录
private short bianlun = -1; private short bianlun = -1;
private short fullShow = -2; private short fullShow = -2;
private Texture2D thumbnailTexture2d = null; private Texture2D thumbnailTexture2d = null;
private bool isDebugTestToEnd = false; private bool isDebugTestToEnd = false;
public GameObject clickPosEff = null;
Dictionary<string, Color[]> allColor = new Dictionary<string, Color[]>();
[SerializeField] [SerializeField]
private int selectTextureIdx = 1; private int selectTextureIdx = 1;
static private string[] allSelectTexturePaths = { }; static private string[] allSelectTexturePaths = {
"scenes/game/cells/buleCell",
"scenes/game/cells/gray",
"scenes/game/cells/grayCell"
};
private ColorIndexTables nowSelectColors = null;
public int SelectTextureIdx public int SelectTextureIdx
{ {
get { return selectTextureIdx; } get { return selectTextureIdx; }
...@@ -153,6 +225,7 @@ public class mainGameView : MonoBehaviour ...@@ -153,6 +225,7 @@ public class mainGameView : MonoBehaviour
if (selectTextureIdx == value) return; if (selectTextureIdx == value) return;
selectTextureIdx = value; selectTextureIdx = value;
//修改 //修改
loadSelectImageTextureId(value);
} }
} }
} }
...@@ -210,6 +283,7 @@ public class mainGameView : MonoBehaviour ...@@ -210,6 +283,7 @@ public class mainGameView : MonoBehaviour
onInitDigitMatrix("thumbnail"); onInitDigitMatrix("thumbnail");
return; return;
} }
utilsTools.setGDataByKey("makeThumbnailBegin", utilsTools.getTotalMillisecond());
var tm = TaskManages.getInstance(); var tm = TaskManages.getInstance();
TaskItemBack taskItemBack = (System.Object[] param) => TaskItemBack taskItemBack = (System.Object[] param) =>
{ {
...@@ -219,26 +293,30 @@ public class mainGameView : MonoBehaviour ...@@ -219,26 +293,30 @@ public class mainGameView : MonoBehaviour
float y = 1.0f; float y = 1.0f;
float width = gameidJsondata.width; float width = gameidJsondata.width;
float height = gameidJsondata.height; float height = gameidJsondata.height;
int a1 = utilsTools.getTotalMillisecond();
utilsTools.sendEventObjectParams("inGameLoadingValue", 6f, false); utilsTools.sendEventObjectParams("inGameLoadingValue", 6f, false);
for (int i = start; i < (start + step); i++) int index = 0;
Color[] colors = lineTexture2d.GetPixels(start, 0, step, gameidJsondata.height);
for(int y1 = 0;y1 < gameidJsondata.height; y1++)
{ {
x = i; y = y1;
for (int j = 0; j < gameidJsondata.height; j++) for(int x1 = start;x1 < (start + step); x1++)
{ {
y = j; x = x1;
var color = colorTexure2d.GetPixelBilinear(x/width,y/height); short nowValue = digitMatrix.Data[x1,y1];
short nowValue = digitMatrix.Data[i, j]; if (nowValue.Equals(bianlun) || nowValue < 0)
if (nowValue.Equals(bianlun) || nowValue < 0) // digitMatrix.Data[i, j].Equals(bianlun) || digitMatrix.Data[i,j].Equals(fullShow))
{
color.a = 1f;
}
else
{ {
color = lineTexture2d.GetPixel(i, j); var color = colorTexure2d.GetPixelBilinear(x / width, y / height);
color.a = 1f;
colors[index] = color;
} }
thumbnailTexture2d.SetPixel(i, j, color); index++;
} }
} }
thumbnailTexture2d.SetPixels(start, 0, step, gameidJsondata.height,colors);
int diff = utilsTools.getTotalMillisecond() - a1;
Debug.Log("*****---- makeThumbnail " + start.ToString() + " diff = " + diff.ToString());
}; };
loopAddTaskBack(gameidJsondata.width,340,taskItemBack); loopAddTaskBack(gameidJsondata.width,340,taskItemBack);
tm.addTask(this, (System.Object[] param) => tm.addTask(this, (System.Object[] param) =>
...@@ -248,7 +326,10 @@ public class mainGameView : MonoBehaviour ...@@ -248,7 +326,10 @@ public class mainGameView : MonoBehaviour
}); });
return; return;
} }
if(name.Equals("thumbnail"))
utilsTools.setGDataByKey("makeThumbnailEnd", utilsTools.getTotalMillisecond());
if (initDigitMatrixs[initDigitMatrixs.Length - 1].Equals("")) return; if (initDigitMatrixs[initDigitMatrixs.Length - 1].Equals("")) return;
nowSelectgid = -1; nowSelectgid = -1;
resetSize(); resetSize();
onInitEndHandler(); onInitEndHandler();
...@@ -292,36 +373,27 @@ public class mainGameView : MonoBehaviour ...@@ -292,36 +373,27 @@ public class mainGameView : MonoBehaviour
void digitMatrixData2GroupPtsInSelect(gameAreaItem gai) void digitMatrixData2GroupPtsInSelect(gameAreaItem gai)
{ {
Color color = new Color(1, 1, 1, 0); Color color = new Color(1, 1, 1, 0);
if (groupPtInfos_All.ContainsKey(gai.gid) == false)
{
groupPtInfos_All.Add(gai.gid, new GroupByAreaPtInfos());
}
digitMatrix.FloodFill8WithStack(gai.px, gai.py, fullShow, 0, (short x, short y, short c) => { digitMatrix.FloodFill8WithStack(gai.px, gai.py, fullShow, 0, (short x, short y, short c) => {
if (gai.IsValid() == false) return true;
if (groupPtInfos.ContainsKey(gai.id) == false) return false;
if (digitMatrix.Data[x, y] == bianlun) if (digitMatrix.Data[x, y] == bianlun)
{ {
groupPtInfos_All[gai.gid].appendLinePos(gai.id, x, y); groupPtInfos_All[gai.gid].appendLinePos(gai.id, x, y);
} }
else else
{ {
lineTexture2d.SetPixel(x, y, color);//选中时候透明处理 //lineTexture2d.SetPixel(x, y, color);//选中时候透明处理
groupPtInfos_All[gai.gid].appendPos(gai.id, x, y); groupPtInfos_All[gai.gid].appendPos(gai.id, x, y);
} }
return true; return true;
}, bianlun, true); }, bianlun, true);
Debug.Log("inselect id " + gai.id.ToString() + " gid = " + gai.gid.ToString() + " len = " + groupPtInfos[gai.gid].debugtestLen(gai.id));
} }
void digitMatrixData2GroupPtsNoSelect(gameAreaItem gai) void digitMatrixData2GroupPtsNoSelect(gameAreaItem gai)
{ {
if (groupPtInfos.ContainsKey(gai.gid) == false)
{
groupPtInfos.Add(gai.gid, new GroupByAreaPtInfos());
}
if (groupPtInfos_All.ContainsKey(gai.gid) == false)
{
groupPtInfos_All.Add(gai.gid, new GroupByAreaPtInfos());
}
digitMatrix.FloodFill8WithStack(gai.px, gai.py, (short)(gai.id + 20), 0, (short x, short y, short c) => { digitMatrix.FloodFill8WithStack(gai.px, gai.py, (short)(gai.id + 20), 0, (short x, short y, short c) => {
if (gai.IsValid() == false) return true;
if (digitMatrix.Data[x, y] == bianlun) if (digitMatrix.Data[x, y] == bianlun)
{ {
groupPtInfos[gai.gid].appendLinePos(gai.id, x, y); groupPtInfos[gai.gid].appendLinePos(gai.id, x, y);
...@@ -334,12 +406,44 @@ public class mainGameView : MonoBehaviour ...@@ -334,12 +406,44 @@ public class mainGameView : MonoBehaviour
} }
return true; return true;
}, bianlun, true); }, bianlun, true);
Debug.Log("noselect id " + gai.id.ToString() + " gid = " + gai.gid.ToString() + " len = " + groupPtInfos[gai.gid].debugtestLen(gai.id));
}
void digitMatrixData2GroupThread(System.Object param)
{
Tuple<int,int> params1 = (Tuple<int,int>)param;
int step = params1.Item1;
int start = params1.Item2;
int idx = start;
int a1 = utilsTools.getTotalMillisecond();
while(idx < gameidJsondata.roomDatas.Count)
{
gameAreaItem item = gameidJsondata.roomDatas[idx];
if (item.IsValid() == false)
{
Debug.Log("unselect id " + item.id.ToString());
idx += step;
continue;
}
if (aid2selectOrderIdx != null && aid2selectOrderIdx.ContainsKey(item.id))
{
digitMatrixData2GroupPtsInSelect(item);
}
else
{
digitMatrixData2GroupPtsNoSelect(item);
}
item.threadHandState = 1;
idx += step;
}
Debug.Log("结束线程 " + start.ToString() + " t1 " + (utilsTools.getTotalMillisecond() - a1).ToString());
return ;
} }
public void onLoadFileOk(int typeId) public void onLoadFileOk(int typeId)
{ {
if (typeId == 1) if (typeId == 1)
{ {
Debug.Log("begin init lunkuo"); utilsTools.setGDataByKey("initFanHong", utilsTools.getTotalMillisecond());
Image image = lineImg.GetComponent<Image>(); Image image = lineImg.GetComponent<Image>();
lineTexture2d = image.sprite.texture; lineTexture2d = image.sprite.texture;
digitMatrix = new DigitMatrixShort(lineTexture2d.width, lineTexture2d.height); digitMatrix = new DigitMatrixShort(lineTexture2d.width, lineTexture2d.height);
...@@ -350,67 +454,92 @@ public class mainGameView : MonoBehaviour ...@@ -350,67 +454,92 @@ public class mainGameView : MonoBehaviour
int setp = (int)datas[2]; int setp = (int)datas[2];
utilsTools.sendEventObjectParams("inGameLoadingValue", 4f, false); utilsTools.sendEventObjectParams("inGameLoadingValue", 4f, false);
int lun = 0; Color[] colors = lineTexture2d.GetPixels(x, 0, setp, height);
int feilun = 0; int idx = 0;
for (int i = x; i < (x + setp); i++) bool isbackWrite = false;
for (int y = 0; y < height; y++)
{ {
for (int j = 0; j < height; j++) for (int x1 = x; x1 < (x + setp); x1++)
{ {
Color color = lineTexture2d.GetPixel(i, j); Color color = colors[idx];
if (color.a == 0) if (color.a == 0)
{ {
digitMatrix.Data[i, j] = 0; digitMatrix.Data[x1,y] = 0;
lineTexture2d.SetPixel(i, j, Color.white);//不合规图片的兼容处理 colors[idx] = Color.white;
feilun++; isbackWrite = true;
} }
else if (color.r >= 0.97 && color.g >= 0.97 && color.b >= 0.97) else if (color.r >= 0.97 && color.g >= 0.97 && color.b >= 0.97)
{ {
digitMatrix.Data[i, j] = 0; digitMatrix.Data[x1, y] = 0;
feilun++;
} }
else else
{ {
digitMatrix.Data[i, j] = bianlun; digitMatrix.Data[x1, y] = bianlun;
lun++;
} }
idx++;
} }
} }
Debug.Log("************ " + height.ToString() + " " + x.ToString() + " " + setp.ToString() + " lun " + lun.ToSafeString() + " feilun = "+feilun.ToString()); if (isbackWrite)
{
lineTexture2d.SetPixels(x, 0, setp, height, colors);
}
}; };
System.Object[] objects = { lineTexture2d.height }; System.Object[] objects = { lineTexture2d.height };
loopAddTaskBack(lineTexture2d.width, 200, taskItemBack,objects); loopAddTaskBack(lineTexture2d.width, 200, taskItemBack,objects);
taskManages.addTask(this, (System.Object[] a) => utilsTools.addTimer_Update(gameObject, "waitJsonBack", (String n) =>
{ {
lineTexture2d.Apply();//将透明度转白色 if (gameidJsondata == null) return true;
TaskItemBack taskItemBack1 = (System.Object[] param) => taskManages.addTask(this, (System.Object[] a) =>
{ {
gameAreaItem gai = (gameAreaItem)param[0]; utilsTools.setGDataByKey("initFanHong_1", utilsTools.getTotalMillisecond());
if (aid2selectOrderIdx != null && aid2selectOrderIdx.ContainsKey(gai.id)) for (int i = 0; i < gameidJsondata.roomGroupsData.Count; i++)
{ {
digitMatrixData2GroupPtsInSelect(gai); short gid = gameidJsondata.roomGroupsData[i].id;
GroupByAreaPtInfos groupByAreaPtInfos = new GroupByAreaPtInfos();
foreach (var item in gameidJsondata.roomGroupsData[i].roomIds)
{
groupByAreaPtInfos.initByAid(item);
}
groupPtInfos.TryAdd(gid, groupByAreaPtInfos);
groupPtInfos_All.TryAdd(gid, groupByAreaPtInfos.Clone());
} }
else int threadCount = 10;
for (int i = 0; i < threadCount; i++)
{ {
digitMatrixData2GroupPtsNoSelect(gai); Thread thread = new Thread(digitMatrixData2GroupThread);
thread.IsBackground = true;
thread.Start(new Tuple<int, int>(threadCount, i));
} }
}; TaskItemBack taskItemBack2 = (System.Object[] param) =>
for (int i = 0; i < gameidJsondata.roomDatas.Count; i++)
{
var item = gameidJsondata.roomDatas[i];
if (digitMatrix.Data[item.px, item.py] == 0)
{ {
System.Object[] temps = { item }; TaskItemBack taskItemBack3 = (TaskItemBack)param[0];
taskManages.addTask(this, taskItemBack1, temps);
} for (int i = 0; i < gameidJsondata.roomDatas.Count; i++)
} {
taskManages.addTask(this, (System.Object[] objects) => var item = gameidJsondata.roomDatas[i];
{ if(item.IsValid() == false) continue;
lineTexture2d.Apply(); if (item.threadHandState == 0)
onInitDigitMatrix("line"); {
//Debug.Log("no init id " + item.id.ToString());
taskManages.addTask(this, taskItemBack3, param);
return;
}
}
utilsTools.setGDataByKey("initFanHong_2", utilsTools.getTotalMillisecond());
taskManages.addTask(this, (System.Object[] objects) =>
{
utilsTools.setGDataByKey("initFanHong_3", utilsTools.getTotalMillisecond());
lineTexture2d.Apply();
onInitDigitMatrix("line");
});
};
taskManages.addTask(this, taskItemBack2, taskItemBack2);
}); });
}); return false;
}, 5, 100000);
} }
else if(typeId == 4) else if(typeId == 4)
{ {
...@@ -418,12 +547,12 @@ public class mainGameView : MonoBehaviour ...@@ -418,12 +547,12 @@ public class mainGameView : MonoBehaviour
TaskItemBack checkPtNextHandler = null; TaskItemBack checkPtNextHandler = null;
checkPtNextHandler = (System.Object[] listparam) => checkPtNextHandler = (System.Object[] listparam) =>
{ {
var checkPt = gameidJsondata.roomDatas[gameidJsondata.roomDatas.Count-1];
if(digitMatrix == null) if(digitMatrix == null)
{ {
tm.addTask(this, checkPtNextHandler, listparam); tm.addTask(this, checkPtNextHandler, listparam);
return; return;
} }
var checkPt = gameidJsondata.roomDatas[gameidJsondata.roomDatas.Count - 1];
Debug.Log(checkPt.ToString()); Debug.Log(checkPt.ToString());
float flg = digitMatrix.Data[checkPt.px,checkPt.py]; float flg = digitMatrix.Data[checkPt.px,checkPt.py];
if(flg == 0) if(flg == 0)
...@@ -431,6 +560,7 @@ public class mainGameView : MonoBehaviour ...@@ -431,6 +560,7 @@ public class mainGameView : MonoBehaviour
tm.addTask(this, checkPtNextHandler); tm.addTask(this, checkPtNextHandler);
return; return;
} }
utilsTools.sendEventObjectParams("inGameLoadingValue", 5f, false); utilsTools.sendEventObjectParams("inGameLoadingValue", 5f, false);
gameidJsondata.roomGroupsData.Sort(gameAreaGroupItem.sortByIsComplete); gameidJsondata.roomGroupsData.Sort(gameAreaGroupItem.sortByIsComplete);
if (areaIdBase != null && perfabPath.Equals("") == false) if (areaIdBase != null && perfabPath.Equals("") == false)
...@@ -438,9 +568,12 @@ public class mainGameView : MonoBehaviour ...@@ -438,9 +568,12 @@ public class mainGameView : MonoBehaviour
//创建一堆节点 //创建一堆节点
TaskItemBack onUpdateByIdNode = (System.Object[] listparam) => TaskItemBack onUpdateByIdNode = (System.Object[] listparam) =>
{ {
utilsTools.setGDataByKey("makeAreaIdBegin", utilsTools.getTotalMillisecond());
utilsTools.sendEventObjectParams("inGameLoadingValue", 5f, false); utilsTools.sendEventObjectParams("inGameLoadingValue", 5f, false);
checkAddAreaId(); checkAddAreaId();
utilsTools.setGDataByKey("makeAreaIdEnd", utilsTools.getTotalMillisecond());
onInitDigitMatrix("select"); onInitDigitMatrix("select");
}; };
tm.addTask(this, onUpdateByIdNode); tm.addTask(this, onUpdateByIdNode);
} }
...@@ -451,22 +584,6 @@ public class mainGameView : MonoBehaviour ...@@ -451,22 +584,6 @@ public class mainGameView : MonoBehaviour
}; };
tm.addTask(this, checkPtNextHandler); tm.addTask(this, checkPtNextHandler);
}else if(typeId == 3)
{
TaskManages tm = TaskManages.getInstance();
TaskItemBack firstHandlGid = (System.Object[] temp) => {
utilsTools.sendEventObjectParams("inGameLoadingValue", 2f, false);
for (int i = 0; i < gameidJsondata.roomGroupsData.Count; i++)
{
var group = gameidJsondata.roomGroupsData[i];
for (int i1 = 0; i1 < group.roomIds.Count(); i1++)
{
gameidJsondata.roomDatas[group.roomIds[i1]].gid = group.id;
}
}
return;
};
tm.addTask(this, firstHandlGid);
}else if(typeId == 2) }else if(typeId == 2)
{ {
if(areaIdBase != null) if(areaIdBase != null)
...@@ -558,11 +675,23 @@ public class mainGameView : MonoBehaviour ...@@ -558,11 +675,23 @@ public class mainGameView : MonoBehaviour
} }
protected void onInitEndHandler() protected void onInitEndHandler()
{ {
Debug.Log("初始化完成 -----------------");
utilsTools.sendEvent("gameViewOnInitEnd"); utilsTools.sendEvent("gameViewOnInitEnd");
if(lowImg == null) if(lowImg == null)
{ {
utilsTools.sendEventObjectParams("inGameLoadingValue", 100f, true); utilsTools.sendEventObjectParams("inGameLoadingValue", 100f, true);
} }
if(clickPosEff != null)
{
GameObject go = Instantiate(clickPosEff);
go.transform.SetParent(areaIdBase.transform);
GameClickPosEffect gameClickPosEffect = go.GetComponent<GameClickPosEffect>();
gameClickPosEffect.runR = 90f;
gameClickPosEffect.maxDotR = 25f;
go.transform.name = "clickPosEff";
gameClickPosEffect.initMember();
go.SetActive(false);
}
} }
public void loadFileInfo(string url,string localpath,int typeId) public void loadFileInfo(string url,string localpath,int typeId)
{ {
...@@ -590,35 +719,21 @@ public class mainGameView : MonoBehaviour ...@@ -590,35 +719,21 @@ public class mainGameView : MonoBehaviour
image = this.lineImg.GetComponent<Image>(); image = this.lineImg.GetComponent<Image>();
}else if(typeId == 2) }else if(typeId == 2)
{ {
utilsTools.setGDataByKey("loadJpgBack", utilsTools.getTotalMillisecond());
image = this.colorImg.GetComponent<Image>(); image = this.colorImg.GetComponent<Image>();
} }
Texture2D texture2d = data as Texture2D; Texture2D texture2d = data as Texture2D;
image.sprite = Sprite.Create(texture2d, new Rect(0, 0, texture2d.width, texture2d.height), new Vector2(0.5f, 0.5f)); image.sprite = Sprite.Create(texture2d, new Rect(0, 0, texture2d.width, texture2d.height), new Vector2(0.5f, 0.5f));
if(lowImg != null && typeId == 1) if(lowImg != null && typeId == 1)
{ {
string lowPath = gameScenUseInfo.getPathByFormath("../{0}_{1}X{2}.png","bule",texture2d.width,texture2d.height); DateTime dt1 = DateTime.UtcNow;
if(utilsTools.IsExistIO(lowPath) == false) utilsTools.setGDataByKey("loadGaoQingBack", utilsTools.getTotalMillisecond());
loadSelectImageTextureId(selectTextureIdx, () =>
{ {
Texture2D lowTexture = new Texture2D(texture2d.width, texture2d.height, TextureFormat.RGBA32, false); Debug.Log("加载选中图并设置Ok4 sec = " + (DateTime.UtcNow - dt1).TotalSeconds.ToString());
Color color = new Color(1, 1, 1, 0); utilsTools.setGDataByKey("selectMember", utilsTools.getTotalMillisecond());
for (int x = 0; x < texture2d.width; x++) onLoadFileOk(4);
{
for(int y = 0;y < texture2d.height; y++)
{
lowTexture.SetPixel(x, y, color);
}
}
utilsTools.saveByteToPath(lowTexture.EncodeToPNG(), lowPath);
utilsTools.saveImageDefaultMetaInfoToPath(lowPath);
}
Image lowImgView = lowImg.GetComponent<Image>();
utilsTools.loadLocalImage(this, lowImgView, lowPath, (bool isOk) => {
if (isOk)
{
utilsTools.sendEventObjectParams("inGameLoadingValue", 10f, false);
lowImgTexture2d = lowImgView.sprite.texture;
onLoadFileOk(4);
}
}); });
} }
onLoadFileOk(typeId); onLoadFileOk(typeId);
...@@ -640,28 +755,42 @@ public class mainGameView : MonoBehaviour ...@@ -640,28 +755,42 @@ public class mainGameView : MonoBehaviour
} }
else else
{ {
utilsTools.setGDataByKey("downJsonBack", utilsTools.getTotalMillisecond());
utilsTools.sendEventObjectParams("inGameLoadingValue", 8f, false); utilsTools.sendEventObjectParams("inGameLoadingValue", 8f, false);
string jsondata = data as string; string jsondata = data as string;
this.gameidJsondata = JsonUtility.FromJson<gameIdJsonData>(jsondata); gameIdJsonData gameidJsondata1 = JsonUtility.FromJson<gameIdJsonData>(jsondata);
utilsTools.setGDataByKey("allAreaSize", gameidJsondata.getAllValidAreaItemSize());
int centerSize = gameidJsondata.roomDatas.Count(); int centerSize = gameidJsondata1.roomDatas.Count();
foreach (var item in aid2selectOrderIdx) foreach (var item in aid2selectOrderIdx)
{ {
gameidJsondata.roomDatas[item.Key].isShow = true; gameidJsondata1.roomDatas[item.Key].isShow = true;
} }
for(int i = 0;i < gameidJsondata.roomGroupsData.Count(); i++) for(int i = 0;i < gameidJsondata1.roomGroupsData.Count(); i++)
{ {
var group = gameidJsondata.roomGroupsData[i]; var group = gameidJsondata1.roomGroupsData[i];
group.isComplete = true; group.isComplete = true;
for (int j = 0; j < group.roomIds.Count(); j++) for (int j = 0; j < group.roomIds.Count(); j++)
{ {
if (gameidJsondata.roomDatas[group.roomIds[j]].isShow == false) if (gameidJsondata1.roomDatas[group.roomIds[j]].isShow == false)
{ {
group.isComplete = false; group.isComplete = false;
break; break;
} }
} }
} }
utilsTools.sendEventObjectParams("inGameLoadingValue", 2f, false);
for (int i = 0; i < gameidJsondata1.roomGroupsData.Count; i++)
{
var group = gameidJsondata1.roomGroupsData[i];
for (int i1 = 0; i1 < group.roomIds.Count(); i1++)
{
gameidJsondata1.roomDatas[group.roomIds[i1]].gid = group.id;
}
}
this.gameidJsondata = gameidJsondata1;
utilsTools.setGDataByKey("allAreaSize", gameidJsondata1.getAllValidAreaItemSize());
utilsTools.setGDataByKey("downJsonAsynTask", utilsTools.getTotalMillisecond());
onLoadFileOk(typeId); onLoadFileOk(typeId);
return 0; return 0;
} }
...@@ -679,6 +808,7 @@ public class mainGameView : MonoBehaviour ...@@ -679,6 +808,7 @@ public class mainGameView : MonoBehaviour
return false; return false;
} }
if (false == gameUserInfo.createWorkDirectory())return false; if (false == gameUserInfo.createWorkDirectory())return false;
utilsTools.sendEventObjectParams("inGameLoadingValue", 3f, false); utilsTools.sendEventObjectParams("inGameLoadingValue", 3f, false);
this.gameScenUseInfo = gameUserInfo; this.gameScenUseInfo = gameUserInfo;
for (short i = 0; i < gameUserInfo.areaInfoUseData.Count; i++) for (short i = 0; i < gameUserInfo.areaInfoUseData.Count; i++)
...@@ -686,8 +816,11 @@ public class mainGameView : MonoBehaviour ...@@ -686,8 +816,11 @@ public class mainGameView : MonoBehaviour
var userAreaData = gameUserInfo.areaInfoUseData[i]; var userAreaData = gameUserInfo.areaInfoUseData[i];
aid2selectOrderIdx.Add(userAreaData.id, i); aid2selectOrderIdx.Add(userAreaData.id, i);
} }
utilsTools.setGDataByKey("downJson", utilsTools.getTotalMillisecond());
loadFileInfo(gameUserInfo.json, jsonPath, 3); loadFileInfo(gameUserInfo.json, jsonPath, 3);
utilsTools.setGDataByKey("loadGaoQing", utilsTools.getTotalMillisecond());
loadFileInfo(gameUserInfo.img,linePath, 1); loadFileInfo(gameUserInfo.img,linePath, 1);
utilsTools.setGDataByKey("loadJpg", utilsTools.getTotalMillisecond());
loadFileInfo(gameUserInfo.finishImg, colorPath, 2); loadFileInfo(gameUserInfo.finishImg, colorPath, 2);
return true; return true;
} }
...@@ -757,6 +890,11 @@ public class mainGameView : MonoBehaviour ...@@ -757,6 +890,11 @@ public class mainGameView : MonoBehaviour
} }
public bool switchShowAreaGroup(short gid, OnAreaHandler onAreaHandler = null) public bool switchShowAreaGroup(short gid, OnAreaHandler onAreaHandler = null)
{ {
//utilsTools.setGDataByKey("makeThumbnailBegin", utilsTools.getTotalMillisecond());
if(utilsTools.ContainsKeyGDataByKey("firstSwitchShowAreaBegin") == false)
{
utilsTools.setGDataByKey("firstSwitchShowAreaBegin", utilsTools.getTotalMillisecond());
}
if (gid == nowSelectgid) if (gid == nowSelectgid)
{ {
if(onAreaHandler != null) if(onAreaHandler != null)
...@@ -779,6 +917,20 @@ public class mainGameView : MonoBehaviour ...@@ -779,6 +917,20 @@ public class mainGameView : MonoBehaviour
gameAreaGroupItem jsonGroupInfo = null; gameAreaGroupItem jsonGroupInfo = null;
GroupByAreaPtInfos groupPt = null; GroupByAreaPtInfos groupPt = null;
List<Vector2Short> tempData = new List<Vector2Short>(); List<Vector2Short> tempData = new List<Vector2Short>();
if (allColor.ContainsKey("line") == false)
{
allColor.Add("line", lineTexture2d.GetPixels(0, 0, gameidJsondata.width, gameidJsondata.height));
}
if(allColor.ContainsKey("low") == false)
{
allColor.Add("low", lowImgTexture2d.GetPixels(0, 0, lowImgTexture2d.width, lowImgTexture2d.height));
}
else
{
allColor["low"] = lowImgTexture2d.GetPixels(0, 0, lowImgTexture2d.width, lowImgTexture2d.height);
}
if (thumbnailTexture2d != null && allColor.ContainsKey("thumbnail") == false)
allColor.Add("thumbnail", thumbnailTexture2d.GetPixels(0, 0, thumbnailTexture2d.width, thumbnailTexture2d.height));
short bianlun = -1; short bianlun = -1;
if (nowSelectgid > 0) if (nowSelectgid > 0)
{ {
...@@ -797,7 +949,9 @@ public class mainGameView : MonoBehaviour ...@@ -797,7 +949,9 @@ public class mainGameView : MonoBehaviour
foreach (var pt in tempData) foreach (var pt in tempData)
{ {
if (digitMatrix.Data[pt.x, pt.y] == bianlun) continue; if (digitMatrix.Data[pt.x, pt.y] == bianlun) continue;
lowImgTexture2d.SetPixel(pt.x, pt.y, color); color.a = 0f;
//lowImgTexture2d.SetPixel(pt.x, pt.y, color);
allColor["low"][pt.y * gameidJsondata.width + pt.x] = color;
} }
} }
} }
...@@ -809,7 +963,7 @@ public class mainGameView : MonoBehaviour ...@@ -809,7 +963,7 @@ public class mainGameView : MonoBehaviour
nowSelectgid = gid; nowSelectgid = gid;
jsonGroupInfo = gameidJsondata.getRoomGroup(nowSelectgid); jsonGroupInfo = gameidJsondata.getRoomGroup(nowSelectgid);
groupPt = groupPtInfos[gid]; groupPt = groupPtInfos[gid];
color = new Color(1, 1, 1, 1);
for (int i = 0; i < jsonGroupInfo.roomIds.Count; i++) for (int i = 0; i < jsonGroupInfo.roomIds.Count; i++)
{ {
...@@ -823,13 +977,21 @@ public class mainGameView : MonoBehaviour ...@@ -823,13 +977,21 @@ public class mainGameView : MonoBehaviour
foreach (var pt in tempData) foreach (var pt in tempData)
{ {
if (digitMatrix.Data[pt.x, pt.y] == bianlun) continue; if (digitMatrix.Data[pt.x, pt.y] == bianlun) continue;
lowImgTexture2d.SetPixel(pt.x, pt.y, color); this.nowSelectColors.getTiledColor(pt.x, pt.y, ref color);
color.a = 1f;
allColor["low"][pt.y * gameidJsondata.width + pt.x] = color;
//lowImgTexture2d.SetPixel(pt.x, pt.y, color);
} }
} }
lowImgTexture2d.SetPixels(0, 0, lowImgTexture2d.width, lowImgTexture2d.height, allColor["low"]);
lowImgTexture2d.Apply(); lowImgTexture2d.Apply();
lowImg.SetActive(true); lowImg.SetActive(true);
if (onAreaHandler != null) if (onAreaHandler != null)
onAreaHandler(gid, true); onAreaHandler(gid, true);
if (utilsTools.ContainsKeyGDataByKey("firstSwitchShowAreaEnd") == false)
{
utilsTools.setGDataByKey("firstSwitchShowAreaEnd", utilsTools.getTotalMillisecond());
}
return true; return true;
} }
...@@ -912,8 +1074,32 @@ public class mainGameView : MonoBehaviour ...@@ -912,8 +1074,32 @@ public class mainGameView : MonoBehaviour
} }
AreaAnimationDiffuse areaAnimationDiffuse = new AreaAnimationDiffuse(x, y, aid); AreaAnimationDiffuse areaAnimationDiffuse = new AreaAnimationDiffuse(x, y, aid);
areaAnimationDiffuse.m_fpsStart = 0; areaAnimationDiffuse.m_fpsStart = 0;
short m_fpsEnd = utilsTools.getGDataByKey<short>("areaOutValue", areaAnimationDiffuse.m_fpsEnd);
areaAnimationDiffuse.m_fpsEnd = m_fpsEnd;
showAreaAnimationDatas.Add(areaAnimationDiffuse); showAreaAnimationDatas.Add(areaAnimationDiffuse);
utilsTools.sendEventObjectParams("showAreaEventOk", areaItem,x,y);
if(areaIdBase != null)
{
var eff = areaIdBase.transform.Find("clickPosEff");
if(eff != null)
{
RectTransform rectTransform = eff.GetComponent<RectTransform>();
float x1 = (((float)x) / (float)gameidJsondata.width);
float y1 = (((float)y) / (float)gameidJsondata.height);
RectTransform areaBase = areaIdBase.GetComponent<RectTransform>();
float w1 = areaBase.rect.width;// * areaBase.localScale.x;
float w2 = areaBase.rect.height;// * areaBase.localScale.y;
x1 = x1 * w1 - w1 / 2;
y1 = y1 * w2 - w2 / 2;
rectTransform.localPosition = new Vector3(x1,y1);
GameClickPosEffect gameClickPosEffect = eff.GetComponent<GameClickPosEffect>();
Color color;
gameidJsondata.getRoomGroup(nowSelectgid).getRGB(out color);
gameClickPosEffect.baseColor = color;
gameClickPosEffect.player1(8, 0.3f);
}
}
utilsTools.sendEventObjectParams("showAreaEventOk", areaItem, x, y);
if (showBack != null) if (showBack != null)
showBack(aid, true); showBack(aid, true);
return true; return true;
...@@ -934,19 +1120,18 @@ public class mainGameView : MonoBehaviour ...@@ -934,19 +1120,18 @@ public class mainGameView : MonoBehaviour
int width = lineTexture2d.width; int width = lineTexture2d.width;
int height = lineTexture2d.height; int height = lineTexture2d.height;
Texture2D selectTexture = null; Texture2D selectTexture = null;
if(lowImg != null) selectTexture = lowImg.GetComponent<Image>().sprite.texture;
{
selectTexture = lowImg.GetComponent<Image>().sprite.texture;
}
List<short> removeAids = new List<short>(); List<short> removeAids = new List<short>();
bool isBackWrite = false;
foreach (var item in showAreaAnimationDatas) foreach (var item in showAreaAnimationDatas)
{ {
float setp = 1f; float setp = 1f;
int cout1 = 0; int cout1 = 0;
if (item.m_fpsStart > 10) if (item.m_fpsEnd > 10)
{ {
setp = 1 / (item.m_fpsStart / 7f); // 32 == > 1 / (8) -- > 0.125
// 52 ==> 1 / 13 0.0769230769230769
setp = 1 / (item.m_fpsEnd / 4f);
} }
short gid = gameidJsondata.getAid(item.m_aid).gid; short gid = gameidJsondata.getAid(item.m_aid).gid;
var groupPtInfo = groupPtInfos[gid]; var groupPtInfo = groupPtInfos[gid];
...@@ -957,28 +1142,29 @@ public class mainGameView : MonoBehaviour ...@@ -957,28 +1142,29 @@ public class mainGameView : MonoBehaviour
for (short r = item.m_fpsStart; r < item.m_fpsEnd; r++) for (short r = item.m_fpsStart; r < item.m_fpsEnd; r++)
{ {
//下标0就只需要一个点就可以了,不需要360都算一遍 //下标0就只需要一个点就可以了,不需要360都算一遍
if (r == 0 && utilsTools.isEqualByValue(angle, 0.0f, 0.00000005f) == false) continue; if (item.m_fpsStart < 2 && r == 0 && utilsTools.isEqualByValue(angle, 0.0f, 0.0005f) == false) continue;
Vector2 scale = direct * r; Vector2 scale = direct * r;
short x = Convert.ToInt16(scale.x+ item.m_x); short x = Convert.ToInt16(scale.x+ item.m_x);
short y = Convert.ToInt16(scale.y + item.m_y); short y = Convert.ToInt16(scale.y + item.m_y);
if (x < 0 || y < 0 || x >= width || y >= height) continue; if (x < 0 || y < 0 || x >= width || y >= height) continue;
short nowDataValue = digitMatrix.Data[x, y]; short nowDataValue = digitMatrix.Data[x, y];
if (nowDataValue.Equals(fullShow)) continue; if (nowDataValue.Equals(fullShow)) continue;
if (!nowDataValue.Equals(nowcheckAid) && !nowDataValue.Equals(bianlun)) { if (!nowDataValue.Equals(nowcheckAid) ) {
continue;
}
if (nowDataValue.Equals(bianlun))
{
continue; continue;
} }
digitMatrix.Data[x, y] = fullShow; digitMatrix.Data[x, y] = fullShow;
Color color = lineTexture2d.GetPixel(x, y); isBackWrite = true;
int idx = y * gameidJsondata.width + x;
Color color = allColor["line"][idx];// lineTexture2d.GetPixel(x, y);
color.a = 0; color.a = 0;
lineTexture2d.SetPixel(x, y, color);//显示过程 allColor["line"][idx] = color;
lowImgTexture2d.SetPixel(x, y, color); allColor["low"][idx] = color;
//lineTexture2d.SetPixel(x, y, color);//显示过程
//lowImgTexture2d.SetPixel(x, y, color);
if (thumbnailTexture2d != null) { if (thumbnailTexture2d != null) {
Color color2 = colorTexure2d.GetPixelBilinear((float)x / (float)gameidJsondata.width, (float)y / (float)gameidJsondata.height); Color color2 = colorTexure2d.GetPixelBilinear((float)x / (float)gameidJsondata.width, (float)y / (float)gameidJsondata.height);
thumbnailTexture2d.SetPixel(x,y,color2); allColor["thumbnail"][idx] = color2;
//thumbnailTexture2d.SetPixel(x,y,color2);
} }
cout++; cout++;
cout1++; cout1++;
...@@ -990,27 +1176,33 @@ public class mainGameView : MonoBehaviour ...@@ -990,27 +1176,33 @@ public class mainGameView : MonoBehaviour
//没有可渲染区域 //没有可渲染区域
removeAids.Add(item.m_aid); removeAids.Add(item.m_aid);
List<Vector2Short> tempLineColors = new List<Vector2Short>(); List<Vector2Short> tempLineColors = new List<Vector2Short>();
groupPtInfo.getLineByAid(item.m_aid,ref tempLineColors); //groupPtInfo.getLineByAid(item.m_aid,ref tempLineColors);
foreach (var item1 in tempLineColors) foreach (var item1 in tempLineColors)
{ {
if (digitMatrix.Data[item1.x,item1.y].Equals(bianlun)) if (digitMatrix.Data[item1.x,item1.y].Equals(bianlun))
{ {
digitMatrix.Data[item1.x, item1.y] = -2; isBackWrite = true;
Color color = lineTexture2d.GetPixel(item1.x, item1.y); int idx = (gameidJsondata.width - item1.x + 1) * gameidJsondata.width + (gameidJsondata.height - item1.y + 1);
digitMatrix.Data[item1.x, item1.y] = fullShow;
Color color = allColor["line"][idx];//lineTexture2d.GetPixel(item1.x, item1.y);
color.a = 0; color.a = 0;
allColor["line"][idx] = color;
allColor["low"][idx] = color;
lineTexture2d.SetPixel(item1.x, item1.y, color);// lineTexture2d.SetPixel(item1.x, item1.y, color);//
lowImgTexture2d.SetPixel(item1.x, item1.y, color); lowImgTexture2d.SetPixel(item1.x, item1.y, color);
if (thumbnailTexture2d != null) if (thumbnailTexture2d != null)
{ {
Color color2 = colorTexure2d.GetPixelBilinear(item1.x / (float)gameidJsondata.width, item1.y / (float)gameidJsondata.height); Color color2 = colorTexure2d.GetPixelBilinear(item1.x / (float)gameidJsondata.width, item1.y / (float)gameidJsondata.height);
thumbnailTexture2d.SetPixel(item1.x, item1.y, color2); //thumbnailTexture2d.SetPixel(item1.x, item1.y, color2);
allColor["thumbnail"][idx] = color2;
} }
} }
} }
groupPtInfo.removeAid(item.m_aid); groupPtInfo.removeAid(item.m_aid);
if (groupPtInfo.getDataAllKey().Length.Equals(0)) if (groupPtInfo.getDataAllKey().Length.Equals(0))
{ {
groupPtInfos.Remove(gid); GroupByAreaPtInfos groupByAreaPtInfos;
groupPtInfos.TryRemove(gid,out groupByAreaPtInfos);
} }
} }
...@@ -1020,6 +1212,14 @@ public class mainGameView : MonoBehaviour ...@@ -1020,6 +1212,14 @@ public class mainGameView : MonoBehaviour
item.m_fpsStart = item.m_fpsEnd; item.m_fpsStart = item.m_fpsEnd;
item.m_fpsEnd += diff; item.m_fpsEnd += diff;
} }
}
if(isBackWrite)
{
lineTexture2d.SetPixels(0, 0, gameidJsondata.width, gameidJsondata.height, allColor["line"]);
selectTexture.SetPixels(0, 0, gameidJsondata.width, gameidJsondata.height, allColor["low"]);
if(thumbnailTexture2d != null)
thumbnailTexture2d.SetPixels(0, 0, gameidJsondata.width, gameidJsondata.height, allColor["line"]);
} }
if (selectTexture != null) if (selectTexture != null)
{ {
...@@ -1221,4 +1421,112 @@ public class mainGameView : MonoBehaviour ...@@ -1221,4 +1421,112 @@ public class mainGameView : MonoBehaviour
utilsTools.sendEventObjectParams("gamePlayerEndHandler"); utilsTools.sendEventObjectParams("gamePlayerEndHandler");
} }
} }
private void loadSelectImageTexture(Texture2D nowSelectTexture,NotifyEmptParam notify, int width = 0,int height = 0)
{
if(width == 0 || height == 0)
{
width = gameidJsondata.width;
height = gameidJsondata.height;
}
Texture2D texture2D = new Texture2D(width,height);
var tm = TaskManages.getInstance();
nowSelectColors = new ColorIndexTables(nowSelectTexture.width,nowSelectTexture.height);
for (int i = 0; i < nowSelectTexture.width; i++)
{
for (int y = 0; y < nowSelectTexture.height; y++)
{
nowSelectColors.setColor(i, y, nowSelectTexture.GetPixel(i, y));
}
}
System.Object[] objects = { texture2D, height };
TaskItemBack taskItemBack = (System.Object[] paramlist) =>
{
Texture2D texture2D1 = (Texture2D)paramlist[0];
int height1 = (int)paramlist[1];
int start = (int)paramlist[2];
int step = (int)paramlist[3];
bool isShow = false;
Color color = new Color(1,1,1,0);
for (int i = 0; i < step; i++)
{
int x = start + i;
for (int y = 0; y < height1; y++)
{
//x,y 怎么转换
texture2D1.SetPixel(x, y, color);
}
}
};
loopAddTaskBack(width, 220, taskItemBack, objects);
System.Object[] objects2 = { texture2D, notify };
tm.addTask(this, (System.Object[] param) =>
{
Texture2D texture2D1 = (Texture2D)param[0];
NotifyEmptParam notify1 = (NotifyEmptParam)param[1];
Sprite sprite = Sprite.Create(texture2D1, new Rect(0, 0, texture2D1.width, texture2D1.height), new Vector2(0.5f, 0.5f));
lowImg.GetComponent<Image>().sprite = sprite;
texture2D1.Apply();
if (lowImgTexture2d != null)
{
Destroy(lowImgTexture2d);
lowImgTexture2d = texture2D1;
}
else
{
lowImgTexture2d = texture2D1;
}
if (notify1 != null) { notify1(); }
}, objects2);
}
private void loadSelectImageTextureId(int idx = 0, NotifyEmptParam notify = null)
{
string path = allSelectTexturePaths[idx];
var req = Resources.LoadAsync<Texture2D>(path);
utilsTools.delTimeHandler(gameObject, "loadGrouSmallText");
utilsTools.addTimer_Update(gameObject, "loadGrouSmallText", (String name) =>
{
if(req.isDone)
{
TaskManages.getInstance().insertTask(this, (System.Object[] param) =>
{
Texture2D texture2D = req.asset as Texture2D;
loadSelectImageTexture(texture2D, notify);
});
return false;
}
return true;
}, 8, 100000);
}
public void showTimes()
{
//结束key 开始value
Dictionary<string,string> timeKeys = new Dictionary<string,string>();
timeKeys.Add("loadingEnd", "downGaoQing");
timeKeys.Add("downGaoQingBack", "downGaoQing");
timeKeys.Add("initFanHong_1", "initFanHong");
timeKeys.Add("initFanHong_2", "initFanHong_1");
timeKeys.Add("initFanHong_3", "initFanHong_2");
timeKeys.Add("downJsonBack", "downJson");
timeKeys.Add("downJsonAsynTask", "downJsonBack");
timeKeys.Add("loadGaoQingBack", "loadGaoQing");
timeKeys.Add("selectMember", "loadGaoQingBack");
timeKeys.Add("makeAreaIdEnd", "makeAreaIdBegin");
timeKeys.Add("makeThumbnailEnd", "makeThumbnailBegin");
timeKeys.Add("loadJpgBack", "loadJpg");
timeKeys.Add("firstSwitchShowAreaEnd", "firstSwitchShowAreaBegin");
String str1 = "";
foreach (var item in timeKeys)
{
int defvalue = 0;
int end = utilsTools.getGDataByKey<int>(item.Key, defvalue);
int begin = utilsTools.getGDataByKey<int>(item.Value, defvalue);
str1 = str1 + item.Key + "-----" + item.Value + ":" + (end - begin).ToString()+"\n";
}
Debug.Log(str1);
transform.parent.Find("debugShowTimes").GetComponent<TextMeshProUGUI>().text = str1;
}
} }
...@@ -30,5 +30,7 @@ public delegate void EventChildItemBack(List<UnityEngine.Object> uobjects, List< ...@@ -30,5 +30,7 @@ public delegate void EventChildItemBack(List<UnityEngine.Object> uobjects, List<
public delegate void OnAreaHandler(int id, bool isOk);//显示区域或者显示组完成回调 public delegate void OnAreaHandler(int id, bool isOk);//显示区域或者显示组完成回调
public delegate void LoadImageBack(Sprite sprite,string id,Image image); public delegate void LoadImageBack(Sprite sprite,string id,Image image);
public delegate void NotifyEmptParam(); public delegate void NotifyEmptParam();
public delegate void NotifyBoolParam(bool isOk);
public delegate void NotifyParam2(string p1, string p2);
public delegate void ActionBack(GameObject gameobject,int aid); public delegate void ActionBack(GameObject gameobject,int aid);
//} //}
...@@ -27,7 +27,7 @@ public class utilsDB ...@@ -27,7 +27,7 @@ public class utilsDB
} }
else else
{ {
db = new SqlHelper("data source=" + path); db = null;// new SqlHelper("data source=" + path);
} }
initTableHashKVS(); initTableHashKVS();
......
...@@ -467,15 +467,17 @@ public class utilsTools ...@@ -467,15 +467,17 @@ public class utilsTools
public static Texture2D ScaleTexture(Texture2D source, int targetWidth, int targetHeight) public static Texture2D ScaleTexture(Texture2D source, int targetWidth, int targetHeight)
{ {
Texture2D result = new Texture2D(targetWidth, targetHeight, source.format, false); Texture2D result = new Texture2D(targetWidth, targetHeight, source.format, false);
Color[] colors = result.GetPixels(0,0,targetWidth,targetHeight);
for (int i = 0; i < result.height; ++i) for (int i = 0; i < result.height; ++i)
{ {
for (int j = 0; j < result.width; ++j) for (int j = 0; j < result.width; ++j)
{ {
Color newColor = source.GetPixelBilinear((float)j / (float)result.width, (float)i / (float)result.height); Color newColor = source.GetPixelBilinear((float)j / (float)result.width, (float)i / (float)result.height);
result.SetPixel(j, i, newColor); //result.SetPixel(j, i, newColor);
colors[i * targetWidth + i] = newColor;
} }
} }
result.SetPixels(0, 0, targetWidth, targetHeight, colors);
return result; return result;
} }
public static bool isEqualByValue(float value1,float value2,float mismatch) public static bool isEqualByValue(float value1,float value2,float mismatch)
...@@ -606,6 +608,11 @@ public class utilsTools ...@@ -606,6 +608,11 @@ public class utilsTools
{ {
return (float)random.NextDouble() * (max - min) + min; return (float)random.NextDouble() * (max - min) + min;
} }
public static int getTotalMillisecond()
{
DateTime dt = DateTime.Now;
return dt.Minute * 60000 + dt.Second * 1000 + dt.Millisecond%1000;
}
public static string copyFile(string path) public static string copyFile(string path)
{ {
//string retpath = path; //string retpath = path;
...@@ -669,4 +676,5 @@ public class utilsTools ...@@ -669,4 +676,5 @@ public class utilsTools
} }
return readPath; return readPath;
} }
} }
\ No newline at end of file
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