更新页面,目前是强制更新
This commit is contained in:
parent
6645310601
commit
2c5501a096
1
.gitignore
vendored
1
.gitignore
vendored
@ -89,3 +89,4 @@ Assets/Resources/Sound.meta
|
|||||||
Assets/MapWorkoutRecords
|
Assets/MapWorkoutRecords
|
||||||
Assets/Mapbox/User
|
Assets/Mapbox/User
|
||||||
Assets/Mapbox/User.meta
|
Assets/Mapbox/User.meta
|
||||||
|
GPUCache
|
||||||
|
|||||||
@ -34,9 +34,9 @@ TextureImporter:
|
|||||||
filterMode: -1
|
filterMode: -1
|
||||||
aniso: -1
|
aniso: -1
|
||||||
mipBias: -100
|
mipBias: -100
|
||||||
wrapU: 2
|
wrapU: 0
|
||||||
wrapV: 2
|
wrapV: 0
|
||||||
wrapW: 2
|
wrapW: 0
|
||||||
nPOTScale: 0
|
nPOTScale: 0
|
||||||
lightmap: 0
|
lightmap: 0
|
||||||
compressionQuality: 50
|
compressionQuality: 50
|
||||||
|
|||||||
BIN
Assets/Resources/Images/empty.png
Normal file
BIN
Assets/Resources/Images/empty.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 155 B |
116
Assets/Resources/Images/empty.png.meta
Normal file
116
Assets/Resources/Images/empty.png.meta
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: fae013de559e1e740bb236a2b9873433
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
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
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: -1
|
||||||
|
aniso: -1
|
||||||
|
mipBias: -100
|
||||||
|
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: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 8
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 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
|
||||||
|
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
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -73,7 +73,7 @@
|
|||||||
fixed4 frag(v2f i): SV_Target
|
fixed4 frag(v2f i): SV_Target
|
||||||
{
|
{
|
||||||
float2 uv = i.uv;
|
float2 uv = i.uv;
|
||||||
uv.x += _Time.x * _Speed;
|
uv.x += -_Time.x * _Speed;
|
||||||
fixed4 col = tex2D(_MainTex, uv);
|
fixed4 col = tex2D(_MainTex, uv);
|
||||||
return col;
|
return col;
|
||||||
}
|
}
|
||||||
|
|||||||
1136
Assets/Resources/UI/Prefab/Panel/DownloadModal.prefab
Normal file
1136
Assets/Resources/UI/Prefab/Panel/DownloadModal.prefab
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7ec53c7e9a2adcd45bbddc2a5f45f95c
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
8
Assets/Resources/UI/Prefab/Update.meta
Normal file
8
Assets/Resources/UI/Prefab/Update.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: acd794cde30107e4e94f8c0f8816c102
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
353
Assets/Resources/UI/Prefab/Update/Log.prefab
Normal file
353
Assets/Resources/UI/Prefab/Update/Log.prefab
Normal file
@ -0,0 +1,353 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &326339817514836837
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1666600795438205962}
|
||||||
|
- component: {fileID: 6978484359839122179}
|
||||||
|
- component: {fileID: 2267838198468736849}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Version
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &1666600795438205962
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 326339817514836837}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 365262040962762308}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 630, y: 28}
|
||||||
|
m_Pivot: {x: 0, y: 0.5}
|
||||||
|
--- !u!222 &6978484359839122179
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 326339817514836837}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &2267838198468736849
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 326339817514836837}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 0.36078432, g: 0.36078432, b: 0.43137258, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_FontData:
|
||||||
|
m_Font: {fileID: 12800000, guid: 1db9e217733971041be26b076fda6083, type: 3}
|
||||||
|
m_FontSize: 24
|
||||||
|
m_FontStyle: 0
|
||||||
|
m_BestFit: 0
|
||||||
|
m_MinSize: 2
|
||||||
|
m_MaxSize: 40
|
||||||
|
m_Alignment: 0
|
||||||
|
m_AlignByGeometry: 0
|
||||||
|
m_RichText: 1
|
||||||
|
m_HorizontalOverflow: 0
|
||||||
|
m_VerticalOverflow: 0
|
||||||
|
m_LineSpacing: 1
|
||||||
|
m_Text: V.1.0.1
|
||||||
|
--- !u!1 &914283288776133487
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 891749258042130654}
|
||||||
|
- component: {fileID: 156201382065931190}
|
||||||
|
- component: {fileID: 7758364436898303417}
|
||||||
|
- component: {fileID: 197050035661571165}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Content
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &891749258042130654
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 914283288776133487}
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 365262040962762308}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
|
m_AnchoredPosition: {x: 20, y: 0}
|
||||||
|
m_SizeDelta: {x: 630, y: 0}
|
||||||
|
m_Pivot: {x: 0, y: 0.5}
|
||||||
|
--- !u!222 &156201382065931190
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 914283288776133487}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &7758364436898303417
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 914283288776133487}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 0.36078432, g: 0.36078432, b: 0.43137258, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_FontData:
|
||||||
|
m_Font: {fileID: 12800000, guid: 1db9e217733971041be26b076fda6083, type: 3}
|
||||||
|
m_FontSize: 12
|
||||||
|
m_FontStyle: 0
|
||||||
|
m_BestFit: 0
|
||||||
|
m_MinSize: 1
|
||||||
|
m_MaxSize: 40
|
||||||
|
m_Alignment: 0
|
||||||
|
m_AlignByGeometry: 0
|
||||||
|
m_RichText: 1
|
||||||
|
m_HorizontalOverflow: 0
|
||||||
|
m_VerticalOverflow: 0
|
||||||
|
m_LineSpacing: 1
|
||||||
|
m_Text: "New update arrival\u2026New update arrival\u2026New update arrival\u2026New
|
||||||
|
update arrival\u2026New update \nNew update arrival\u2026New update arrival\u2026New
|
||||||
|
update arrival\u2026New update arrival\u2026New update New update adate arrival\u2026New
|
||||||
|
update New update arrival\u2026New update arrival\u2026New update arrival\u2026New
|
||||||
|
update arrival\u2026New update New update arrival\u2026New update arrival\u2026New
|
||||||
|
update arrival\u2026New update arrival\u2026New update "
|
||||||
|
--- !u!114 &197050035661571165
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 914283288776133487}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_HorizontalFit: 0
|
||||||
|
m_VerticalFit: 2
|
||||||
|
--- !u!1 &5138866742758007992
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 8430125628824868967}
|
||||||
|
- component: {fileID: 5462072026116756751}
|
||||||
|
- component: {fileID: 2955003598880437185}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Image
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &8430125628824868967
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5138866742758007992}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 365262040962762308}
|
||||||
|
m_RootOrder: 2
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 630, y: 1}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &5462072026116756751
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5138866742758007992}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &2955003598880437185
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5138866742758007992}
|
||||||
|
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.25490198, g: 0.25882354, b: 0.31764707, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
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 &9148783270106592700
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 365262040962762308}
|
||||||
|
- component: {fileID: 7638952166291735191}
|
||||||
|
- component: {fileID: 1298518755096521784}
|
||||||
|
- component: {fileID: 3913689988452926392}
|
||||||
|
- component: {fileID: 6233156287243473405}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Log
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &365262040962762308
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 9148783270106592700}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 1666600795438205962}
|
||||||
|
- {fileID: 891749258042130654}
|
||||||
|
- {fileID: 8430125628824868967}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 670, y: 0}
|
||||||
|
m_Pivot: {x: 0, y: 1}
|
||||||
|
--- !u!222 &7638952166291735191
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 9148783270106592700}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &1298518755096521784
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 9148783270106592700}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Padding:
|
||||||
|
m_Left: 20
|
||||||
|
m_Right: 20
|
||||||
|
m_Top: 20
|
||||||
|
m_Bottom: 0
|
||||||
|
m_ChildAlignment: 0
|
||||||
|
m_Spacing: 16
|
||||||
|
m_ChildForceExpandWidth: 1
|
||||||
|
m_ChildForceExpandHeight: 1
|
||||||
|
m_ChildControlWidth: 0
|
||||||
|
m_ChildControlHeight: 0
|
||||||
|
m_ChildScaleWidth: 0
|
||||||
|
m_ChildScaleHeight: 0
|
||||||
|
--- !u!114 &3913689988452926392
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 9148783270106592700}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_HorizontalFit: 0
|
||||||
|
m_VerticalFit: 2
|
||||||
|
--- !u!114 &6233156287243473405
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 9148783270106592700}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 8e370f7cb0f6c044f90aed68484553f1, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
7
Assets/Resources/UI/Prefab/Update/Log.prefab.meta
Normal file
7
Assets/Resources/UI/Prefab/Update/Log.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f25c53b6a705b1f40a18e969b05a69aa
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -323,49 +323,6 @@ CanvasRenderer:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 273807000}
|
m_GameObject: {fileID: 273807000}
|
||||||
m_CullTransparentMesh: 0
|
m_CullTransparentMesh: 0
|
||||||
--- !u!1 &584235025
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 584235027}
|
|
||||||
- component: {fileID: 584235026}
|
|
||||||
m_Layer: 0
|
|
||||||
m_Name: _xcharts_
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!114 &584235026
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 584235025}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 953f0e846565c4086a4bcdc6bc14cf85, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
--- !u!4 &584235027
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 584235025}
|
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 0}
|
|
||||||
m_RootOrder: 5
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
--- !u!1 &724627085
|
--- !u!1 &724627085
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -873,5 +830,5 @@ Transform:
|
|||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 6
|
m_RootOrder: 5
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
|||||||
@ -7,7 +7,6 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using UnityEditor.Events;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.EventSystems;
|
using UnityEngine.EventSystems;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|||||||
22
Assets/Scripts/Apis/Models/UpdateModel.cs
Normal file
22
Assets/Scripts/Apis/Models/UpdateModel.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Assets.Scripts.Apis.Models
|
||||||
|
{
|
||||||
|
public class UpdateModel
|
||||||
|
{
|
||||||
|
public bool HasUpdate { get; set; }
|
||||||
|
public string Url { get; set; }
|
||||||
|
public string Code { get; set; }
|
||||||
|
public List<VersionModel> UpdateLog { get; set; }
|
||||||
|
}
|
||||||
|
public class VersionModel
|
||||||
|
{
|
||||||
|
public string Version { get; set; }
|
||||||
|
public DateTime CreateTime { get; set; }
|
||||||
|
public string Desc { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Scripts/Apis/Models/UpdateModel.cs.meta
Normal file
11
Assets/Scripts/Apis/Models/UpdateModel.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 72e93f3cdcc50a64aa7dbda61c720707
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -8,9 +8,9 @@ using System.Net;
|
|||||||
|
|
||||||
public static class App
|
public static class App
|
||||||
{
|
{
|
||||||
public static string Host = "http://192.168.0.97:5082/";
|
public static string Host = "http://192.168.0.101:5082/";
|
||||||
|
|
||||||
public static string AppVersion = "1.0.0";
|
public static string AppVersion = Application.version;
|
||||||
|
|
||||||
public static int RouteIdParam = 0;
|
public static int RouteIdParam = 0;
|
||||||
public static UserResultModel CurrentUser { get; set; }
|
public static UserResultModel CurrentUser { get; set; }
|
||||||
@ -44,7 +44,10 @@ public static class App
|
|||||||
|
|
||||||
public static IPEndPoint UdpAddress { get; private set; } = new IPEndPoint(IPAddress.Parse("192.168.0.97"), 11000);
|
public static IPEndPoint UdpAddress { get; private set; } = new IPEndPoint(IPAddress.Parse("192.168.0.97"), 11000);
|
||||||
public static IPEndPoint TcpAddress { get; private set; } = new IPEndPoint(IPAddress.Parse("192.168.0.97"), 21001);
|
public static IPEndPoint TcpAddress { get; private set; } = new IPEndPoint(IPAddress.Parse("192.168.0.97"), 21001);
|
||||||
|
public static UpdateModel UpdateObject { get; set; }
|
||||||
|
//public static string AppDownloadUrl { get; internal set; }
|
||||||
|
//public static string AppVersionCode { get; internal set; }
|
||||||
|
|
||||||
static App()
|
static App()
|
||||||
{
|
{
|
||||||
#if !UNITY_EDITOR
|
#if !UNITY_EDITOR
|
||||||
@ -52,6 +55,5 @@ public static class App
|
|||||||
UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21000);
|
UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21000);
|
||||||
TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21001);
|
TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21001);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -217,7 +217,7 @@ public class LoginController : MonoBehaviour
|
|||||||
{
|
{
|
||||||
var info = Instantiate(Resources.Load<GameObject>("UI/Prefab/Login/QuickUserInfo")).transform;
|
var info = Instantiate(Resources.Load<GameObject>("UI/Prefab/Login/QuickUserInfo")).transform;
|
||||||
info.GetComponent<QuickLoginUser>().Initial(user, transform);
|
info.GetComponent<QuickLoginUser>().Initial(user, transform);
|
||||||
info.parent = content;
|
info.SetParent(content);
|
||||||
info.localScale = new Vector3(1, 1, 1);
|
info.localScale = new Vector3(1, 1, 1);
|
||||||
}
|
}
|
||||||
content.Find("empty1").transform.SetSiblingIndex(0);
|
content.Find("empty1").transform.SetSiblingIndex(0);
|
||||||
@ -459,24 +459,33 @@ public class LoginController : MonoBehaviour
|
|||||||
|
|
||||||
async void Init()
|
async void Init()
|
||||||
{
|
{
|
||||||
GetRotateImage();
|
|
||||||
UIManager.Instance.ModalsPanel = this.transform.Find("ModalPanel").GetComponent<PFUIPanel>();
|
UIManager.Instance.ModalsPanel = this.transform.Find("ModalPanel").GetComponent<PFUIPanel>();
|
||||||
userInfos = UIManager.Instance.userInfos;
|
userInfos = UIManager.Instance.userInfos;
|
||||||
App.DefaultRotateTexture = Utils.ReadTextureFromPlayerPrefs("rotateImage");
|
App.DefaultRotateTexture = Utils.ReadTextureFromPlayerPrefs("rotateImage");
|
||||||
var notifyId = PlayerPrefs.GetInt("notifyId");
|
|
||||||
App.firstEnter = PlayerPrefs.GetInt("firstEnter");
|
App.firstEnter = PlayerPrefs.GetInt("firstEnter");
|
||||||
PlayerPrefs.SetInt("firstEnter", 1);
|
PlayerPrefs.SetInt("firstEnter", 1);
|
||||||
|
var notifyId = PlayerPrefs.GetInt("notifyId");
|
||||||
var r = await ConfigHelper.userApi.GetNotify();
|
var r = await ConfigHelper.userApi.GetNotify();
|
||||||
if (r.result)
|
if (r.result)
|
||||||
{
|
{
|
||||||
|
//#if !UNITY_EDITOR
|
||||||
|
var ver = r.data.Value<JObject>("Version").ToObject<UpdateModel>();
|
||||||
|
if (ver!=null && ver.HasUpdate)
|
||||||
|
{
|
||||||
|
App.UpdateObject = ver;
|
||||||
|
Debug.Log(Application.persistentDataPath + "/PowerFun.exe");
|
||||||
|
UIManager.ShowDownloadModal();
|
||||||
|
}
|
||||||
|
//#endif
|
||||||
App.notifyContent = r.data.Value<string>("Content");
|
App.notifyContent = r.data.Value<string>("Content");
|
||||||
|
|
||||||
if (r.data.Value<int>("Id") != notifyId)
|
if (r.data.Value<int>("Id") != notifyId)
|
||||||
{
|
{
|
||||||
UIManager.ShowNewsModal();
|
UIManager.ShowNewsModal();
|
||||||
PlayerPrefs.SetInt("notifyId", r.data.Value<int>("Id"));
|
PlayerPrefs.SetInt("notifyId", r.data.Value<int>("Id"));
|
||||||
}
|
}
|
||||||
//content.GetComponent<Text>().text
|
|
||||||
}
|
}
|
||||||
|
GetRotateImage();
|
||||||
}
|
}
|
||||||
|
|
||||||
async void GetRotateImage()
|
async void GetRotateImage()
|
||||||
@ -518,14 +527,6 @@ public class LoginController : MonoBehaviour
|
|||||||
private void AdjustWxQrCode()
|
private void AdjustWxQrCode()
|
||||||
{
|
{
|
||||||
wxBrowser.EvalJSCSP(@"
|
wxBrowser.EvalJSCSP(@"
|
||||||
const f = ()=>{
|
|
||||||
//if(document.body.style.padding === '0px')
|
|
||||||
//{
|
|
||||||
// console.log('停止');
|
|
||||||
// isFinish();
|
|
||||||
// return;
|
|
||||||
//}
|
|
||||||
console.log('js调整');
|
|
||||||
document.getElementsByClassName('qrcode')[0].style.marginTop = 0;
|
document.getElementsByClassName('qrcode')[0].style.marginTop = 0;
|
||||||
document.getElementsByClassName('title')[0].style.display = 'none';
|
document.getElementsByClassName('title')[0].style.display = 'none';
|
||||||
document.getElementById('wx_default_tip').childNodes[3].innerHTML = `""PowerFun""`;
|
document.getElementById('wx_default_tip').childNodes[3].innerHTML = `""PowerFun""`;
|
||||||
@ -533,10 +534,7 @@ public class LoginController : MonoBehaviour
|
|||||||
document.body.style.overflow = 'hidden';
|
document.body.style.overflow = 'hidden';
|
||||||
document.body.style.transformOrigin = 'top left';
|
document.body.style.transformOrigin = 'top left';
|
||||||
document.body.style.transform = 'scale(0.85106382978)';
|
document.body.style.transform = 'scale(0.85106382978)';
|
||||||
document.body.style.padding = '0';
|
document.body.style.padding = '0';").Done();
|
||||||
|
|
||||||
}
|
|
||||||
f();").Done();
|
|
||||||
}
|
}
|
||||||
//浏览器加载回调
|
//浏览器加载回调
|
||||||
private async void OnUserScan()
|
private async void OnUserScan()
|
||||||
|
|||||||
@ -47,7 +47,7 @@ public class MainController : MonoBehaviour
|
|||||||
//{
|
//{
|
||||||
// UIManager.ShowHomePanel();
|
// UIManager.ShowHomePanel();
|
||||||
//});
|
//});
|
||||||
if (App.MainSceneParam.ContainsKey("Name") && !string.IsNullOrEmpty(App.MainSceneParam["Name"]) )
|
if (App.MainSceneParam.ContainsKey("Name") && !string.IsNullOrEmpty(App.MainSceneParam["Name"]))
|
||||||
{
|
{
|
||||||
UIManager.PushHome();
|
UIManager.PushHome();
|
||||||
if (App.MainSceneParam["Name"] == "MapListPanel")
|
if (App.MainSceneParam["Name"] == "MapListPanel")
|
||||||
@ -59,6 +59,7 @@ public class MainController : MonoBehaviour
|
|||||||
{
|
{
|
||||||
UIManager.ShowUserInfoPanel();
|
UIManager.ShowUserInfoPanel();
|
||||||
}
|
}
|
||||||
|
App.MainSceneParam["Name"] = string.Empty;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -127,6 +127,7 @@ public class ConnectDeviceModal : PFUIPanel
|
|||||||
//Debug.Log(AntConnector.Instance().discoveredDevices.Count(d => d.Sensor == SensorType));
|
//Debug.Log(AntConnector.Instance().discoveredDevices.Count(d => d.Sensor == SensorType));
|
||||||
|
|
||||||
var devices = new List<AbstractAntDevice>();
|
var devices = new List<AbstractAntDevice>();
|
||||||
|
var a = AntConnector.Instance().discoveredDevices;
|
||||||
switch (SensorType)
|
switch (SensorType)
|
||||||
{
|
{
|
||||||
case SensorType.Cadence:
|
case SensorType.Cadence:
|
||||||
|
|||||||
8
Assets/Scripts/UI/Prefab/Update.meta
Normal file
8
Assets/Scripts/UI/Prefab/Update.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 25494196c8da0294aa28730d63bf7498
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
138
Assets/Scripts/UI/Prefab/Update/DownloadController.cs
Normal file
138
Assets/Scripts/UI/Prefab/Update/DownloadController.cs
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
using Assets.Scripts;
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Net;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.Networking;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
public class DownloadController : PFUIPanel
|
||||||
|
{
|
||||||
|
// Start is called before the first frame update
|
||||||
|
Transform Button,Loading,Exit;
|
||||||
|
ScrollRect scroll;
|
||||||
|
string path;
|
||||||
|
[SerializeField] Transform log;
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
Button = transform.Find("Panel/BtnConfirm");
|
||||||
|
Loading = transform.Find("Panel/LoadingContainer");
|
||||||
|
scroll = transform.Find("Panel/Scroll View").GetComponent<ScrollRect>();
|
||||||
|
Exit = transform.Find("Panel/Exit");
|
||||||
|
UIManager.AddEvent(Exit.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, (b) =>
|
||||||
|
{
|
||||||
|
Utils.showToast(gameObject, "Please update to the latest version.");
|
||||||
|
});
|
||||||
|
SetType(false);
|
||||||
|
//Button.GetComponent<Button>().enabled = false;
|
||||||
|
//Button.GetComponent<Button>().interactable = false;
|
||||||
|
path = Application.persistentDataPath + "/PowerFun.exe";
|
||||||
|
UIManager.AddEvent(Button.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, (b) =>
|
||||||
|
{
|
||||||
|
Application.Quit();
|
||||||
|
Utils.ExecFile(path);
|
||||||
|
});
|
||||||
|
//transform
|
||||||
|
if (App.UpdateObject != null)
|
||||||
|
{
|
||||||
|
StartCoroutine(DownLoadExe(App.UpdateObject.Url, path, (a, b, isComplete) =>
|
||||||
|
{
|
||||||
|
transform.Find("Panel/LoadingContainer/Text").GetComponent<Text>().text = $"Downloaded {a.ToString("#0")}M / {b.ToString("#0")}M";// string.Format(, a, b);
|
||||||
|
transform.Find("Panel/LoadingContainer/Loading").GetComponent<Image>().fillAmount = (float)(a / b);
|
||||||
|
if (isComplete)
|
||||||
|
{
|
||||||
|
SetType(true);
|
||||||
|
PlayerPrefs.SetString("exeVersion", App.UpdateObject.Code);
|
||||||
|
new FileInfo(path + ".pfdownload").MoveTo(path);
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
for (var i = 0; i < App.UpdateObject.UpdateLog.Count; i++)
|
||||||
|
{
|
||||||
|
var newLog = Instantiate<Transform>(log);
|
||||||
|
newLog.GetComponent<DownloadLog>().Initial(App.UpdateObject.UpdateLog[i]);
|
||||||
|
if (i == App.UpdateObject.UpdateLog.Count - 1)
|
||||||
|
{
|
||||||
|
newLog.GetComponent<DownloadLog>().HideLine();
|
||||||
|
}
|
||||||
|
newLog.SetParent(scroll.content);
|
||||||
|
newLog.localScale = Vector3.one;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*下载文件*/
|
||||||
|
IEnumerator DownLoadExe(string url, string desFileName, Action<double, double, bool> OnDownloadProgressEvent)
|
||||||
|
{
|
||||||
|
string version = null;
|
||||||
|
if (App.UpdateObject != null)
|
||||||
|
{
|
||||||
|
version = App.UpdateObject.Code;
|
||||||
|
}
|
||||||
|
if (File.Exists(desFileName))
|
||||||
|
{
|
||||||
|
//if(PlayerPrefs.GetString("exeVersion")==)
|
||||||
|
if (version == null)
|
||||||
|
{
|
||||||
|
yield break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (version == PlayerPrefs.GetString("exeVersion"))
|
||||||
|
{
|
||||||
|
Application.Quit();
|
||||||
|
Utils.ExecFile(desFileName);
|
||||||
|
yield break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
File.Delete(desFileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//File.Delete(desFileName);
|
||||||
|
}
|
||||||
|
if (File.Exists(desFileName + ".pfdownload"))
|
||||||
|
{
|
||||||
|
File.Delete(desFileName + ".pfdownload");
|
||||||
|
}
|
||||||
|
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
|
||||||
|
request.Timeout = 5000;
|
||||||
|
WebResponse response = request.GetResponse();
|
||||||
|
//UnityWebRequest request = UnityWebRequest.Get(url);
|
||||||
|
//yield return request.SendWebRequest();
|
||||||
|
int packLength = 1024 * 20;
|
||||||
|
int nReadSize = 0;
|
||||||
|
byte[] nbytes = new byte[packLength];
|
||||||
|
double dDownloadedLength = 0, dTotalLength = 0;
|
||||||
|
long countLength = response.ContentLength;
|
||||||
|
using (FileStream fs = new FileStream(desFileName + ".pfdownload", FileMode.Create))
|
||||||
|
using (Stream netStream = response.GetResponseStream())
|
||||||
|
{
|
||||||
|
nReadSize = netStream.Read(nbytes, 0, packLength);
|
||||||
|
while (nReadSize > 0)
|
||||||
|
{
|
||||||
|
fs.Write(nbytes, 0, nReadSize);
|
||||||
|
nReadSize = netStream.Read(nbytes, 0, packLength);
|
||||||
|
dDownloadedLength = fs.Length * 1.0 / (1024 * 1024);
|
||||||
|
dTotalLength = countLength * 1.0 / (1024 * 1024);
|
||||||
|
OnDownloadProgressEvent.Invoke(dDownloadedLength, dTotalLength, false);
|
||||||
|
//string ss = string.Format("已下载 {0:F}M / {1:F}M", dDownloadedLength, dTotalLength);
|
||||||
|
//Debug.Log(ss);
|
||||||
|
yield return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
OnDownloadProgressEvent.Invoke(dDownloadedLength, dTotalLength, true);
|
||||||
|
}
|
||||||
|
void SetType(bool f)
|
||||||
|
{
|
||||||
|
// true 显示 button false 显示loading
|
||||||
|
Button.gameObject.SetActive(f);
|
||||||
|
Loading.gameObject.SetActive(!f);
|
||||||
|
}
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Scripts/UI/Prefab/Update/DownloadController.cs.meta
Normal file
11
Assets/Scripts/UI/Prefab/Update/DownloadController.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3722db1a87877f9458f6932efd042b51
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
32
Assets/Scripts/UI/Prefab/Update/DownloadLog.cs
Normal file
32
Assets/Scripts/UI/Prefab/Update/DownloadLog.cs
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
using Assets.Scripts.Apis.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
public class DownloadLog : MonoBehaviour
|
||||||
|
{
|
||||||
|
// Start is called before the first frame update
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
public void Initial(VersionModel version)
|
||||||
|
{
|
||||||
|
transform.Find("Version").GetComponent<Text>().text = version.Version;
|
||||||
|
transform.Find("Content").GetComponent<Text>().text = version.Desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void HideLine()
|
||||||
|
{
|
||||||
|
transform.Find("Image").gameObject.SetActive(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Scripts/UI/Prefab/Update/DownloadLog.cs.meta
Normal file
11
Assets/Scripts/UI/Prefab/Update/DownloadLog.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8e370f7cb0f6c044f90aed68484553f1
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -83,6 +83,15 @@ public class UIManager : MonoBehaviour
|
|||||||
return this.GetPanelInstance("NewsModal", ref this.mNewsContoller);
|
return this.GetPanelInstance("NewsModal", ref this.mNewsContoller);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private DownloadController mDownloadModal;
|
||||||
|
public DownloadController DownloadModal
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.GetPanelInstance("DownloadModal", ref this.mDownloadModal);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private MapListController mMapListController;
|
private MapListController mMapListController;
|
||||||
public MapListController MapListPanel
|
public MapListController MapListPanel
|
||||||
{
|
{
|
||||||
@ -355,6 +364,10 @@ public class UIManager : MonoBehaviour
|
|||||||
{
|
{
|
||||||
UIManager.Show(UIManager.Instance.NewsModal, null, true);
|
UIManager.Show(UIManager.Instance.NewsModal, null, true);
|
||||||
}
|
}
|
||||||
|
public static void ShowDownloadModal()
|
||||||
|
{
|
||||||
|
UIManager.Show(UIManager.Instance.DownloadModal, null, true);
|
||||||
|
}
|
||||||
public static void ShowFeedBackModal()
|
public static void ShowFeedBackModal()
|
||||||
{
|
{
|
||||||
UIManager.Show(UIManager.Instance.FeedbackModal, null, true);
|
UIManager.Show(UIManager.Instance.FeedbackModal, null, true);
|
||||||
|
|||||||
@ -228,7 +228,7 @@ namespace Assets.Scripts
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
UIManager.Instance.StartCoroutine(DownloadImage(img, url,(texture)=> {
|
UIManager.Instance.StartCoroutine(DownloadImage(img, url,(texture)=> {
|
||||||
if (cache)
|
if (cache && !propTextureCache.ContainsKey(url))
|
||||||
{
|
{
|
||||||
propTextureCache.Add(url, texture);
|
propTextureCache.Add(url, texture);
|
||||||
}
|
}
|
||||||
@ -419,5 +419,24 @@ namespace Assets.Scripts
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*文本框/下拉框错误*/
|
/*文本框/下拉框错误*/
|
||||||
|
|
||||||
|
|
||||||
|
public static void ExecFile(string path)
|
||||||
|
{
|
||||||
|
System.Diagnostics.Process proc = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
proc = new System.Diagnostics.Process();
|
||||||
|
proc.StartInfo.FileName = path;
|
||||||
|
proc.StartInfo.CreateNoWindow = false;
|
||||||
|
proc.StartInfo.Verb = "runas";
|
||||||
|
proc.Start();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine("执行批处理的时候出现了异常!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*下载文件*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user