Merge branch 'dev_lishuo' into dev
This commit is contained in:
commit
3e38fd65c2
@ -162,7 +162,7 @@ AnimatorStateTransition:
|
|||||||
m_Conditions:
|
m_Conditions:
|
||||||
- m_ConditionMode: 4
|
- m_ConditionMode: 4
|
||||||
m_ConditionEvent: Speed
|
m_ConditionEvent: Speed
|
||||||
m_EventTreshold: 0
|
m_EventTreshold: 1
|
||||||
m_DstStateMachine: {fileID: 0}
|
m_DstStateMachine: {fileID: 0}
|
||||||
m_DstState: {fileID: 4337543228220508350}
|
m_DstState: {fileID: 4337543228220508350}
|
||||||
m_Solo: 0
|
m_Solo: 0
|
||||||
@ -326,25 +326,25 @@ AnimatorController:
|
|||||||
m_DefaultFloat: 0
|
m_DefaultFloat: 0
|
||||||
m_DefaultInt: 0
|
m_DefaultInt: 0
|
||||||
m_DefaultBool: 0
|
m_DefaultBool: 0
|
||||||
m_Controller: {fileID: 0}
|
m_Controller: {fileID: 9100000}
|
||||||
- m_Name: ReachEnd
|
- m_Name: ReachEnd
|
||||||
m_Type: 4
|
m_Type: 4
|
||||||
m_DefaultFloat: 0
|
m_DefaultFloat: 0
|
||||||
m_DefaultInt: 0
|
m_DefaultInt: 0
|
||||||
m_DefaultBool: 0
|
m_DefaultBool: 0
|
||||||
m_Controller: {fileID: 0}
|
m_Controller: {fileID: 9100000}
|
||||||
- m_Name: Speed
|
- m_Name: Speed
|
||||||
m_Type: 1
|
m_Type: 1
|
||||||
m_DefaultFloat: 30
|
m_DefaultFloat: 30
|
||||||
m_DefaultInt: 0
|
m_DefaultInt: 0
|
||||||
m_DefaultBool: 0
|
m_DefaultBool: 0
|
||||||
m_Controller: {fileID: 0}
|
m_Controller: {fileID: 9100000}
|
||||||
- m_Name: Slope
|
- m_Name: Slope
|
||||||
m_Type: 1
|
m_Type: 1
|
||||||
m_DefaultFloat: 5
|
m_DefaultFloat: 5
|
||||||
m_DefaultInt: 0
|
m_DefaultInt: 0
|
||||||
m_DefaultBool: 0
|
m_DefaultBool: 0
|
||||||
m_Controller: {fileID: 0}
|
m_Controller: {fileID: 9100000}
|
||||||
m_AnimatorLayers:
|
m_AnimatorLayers:
|
||||||
- serializedVersion: 5
|
- serializedVersion: 5
|
||||||
m_Name: Base Layer
|
m_Name: Base Layer
|
||||||
@ -420,7 +420,7 @@ AnimatorStateTransition:
|
|||||||
m_Conditions:
|
m_Conditions:
|
||||||
- m_ConditionMode: 3
|
- m_ConditionMode: 3
|
||||||
m_ConditionEvent: Speed
|
m_ConditionEvent: Speed
|
||||||
m_EventTreshold: 0
|
m_EventTreshold: 1
|
||||||
m_DstStateMachine: {fileID: 0}
|
m_DstStateMachine: {fileID: 0}
|
||||||
m_DstState: {fileID: -2278438292350793016}
|
m_DstState: {fileID: -2278438292350793016}
|
||||||
m_Solo: 0
|
m_Solo: 0
|
||||||
|
|||||||
BIN
Assets/Resources/Images/Ride/change-mode.png
Normal file
BIN
Assets/Resources/Images/Ride/change-mode.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
104
Assets/Resources/Images/Ride/change-mode.png.meta
Normal file
104
Assets/Resources/Images/Ride/change-mode.png.meta
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f47cb78230119f541bfc4950bfdd8ce0
|
||||||
|
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
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
Assets/Resources/Images/Ride/full 1.png
Normal file
BIN
Assets/Resources/Images/Ride/full 1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
104
Assets/Resources/Images/Ride/full 1.png.meta
Normal file
104
Assets/Resources/Images/Ride/full 1.png.meta
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2b5809638b47bfe468aa35842ee1fd50
|
||||||
|
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
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
Assets/Resources/Images/Ride/simple 1.png
Normal file
BIN
Assets/Resources/Images/Ride/simple 1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
104
Assets/Resources/Images/Ride/simple 1.png.meta
Normal file
104
Assets/Resources/Images/Ride/simple 1.png.meta
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 035bf86376f581f46af0bd5e15999ae0
|
||||||
|
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
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
2808
Assets/Resources/UI/Prefab/ResultList/LocalRouteItem.prefab
Normal file
2808
Assets/Resources/UI/Prefab/ResultList/LocalRouteItem.prefab
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 27d66dc2cf0c0944da1bb3dd00e0e721
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -509,8 +509,8 @@ MonoBehaviour:
|
|||||||
m_Colors:
|
m_Colors:
|
||||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||||
m_PressedColor: {r: 0.2974442, g: 0.23429158, b: 0.6132076, a: 1}
|
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||||
m_SelectedColor: {r: 0.12415449, g: 0.8490566, b: 0.28121665, a: 1}
|
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||||
m_ColorMultiplier: 1
|
m_ColorMultiplier: 1
|
||||||
m_FadeDuration: 0.1
|
m_FadeDuration: 0.1
|
||||||
|
|||||||
@ -481,8 +481,8 @@ MonoBehaviour:
|
|||||||
m_Colors:
|
m_Colors:
|
||||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||||
m_PressedColor: {r: 0.2974442, g: 0.23429158, b: 0.6132076, a: 1}
|
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||||
m_SelectedColor: {r: 0.12415449, g: 0.8490566, b: 0.28121665, a: 1}
|
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||||
m_ColorMultiplier: 1
|
m_ColorMultiplier: 1
|
||||||
m_FadeDuration: 0.1
|
m_FadeDuration: 0.1
|
||||||
|
|||||||
@ -198,7 +198,7 @@ RectTransform:
|
|||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 255, y: 48}
|
m_SizeDelta: {x: 215, y: 48}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &8877223148509276859
|
--- !u!222 &8877223148509276859
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
@ -381,8 +381,8 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 1}
|
||||||
m_AnchoredPosition: {x: 141, y: -17.5}
|
m_AnchoredPosition: {x: 126.09, y: -17.5}
|
||||||
m_SizeDelta: {x: 190, y: 19}
|
m_SizeDelta: {x: 160.17761, y: 19}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &8877223148939721184
|
--- !u!222 &8877223148939721184
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -133,14 +133,7 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
{
|
{
|
||||||
characterAnimator.speed = 1f;
|
characterAnimator.speed = 1f;
|
||||||
}
|
}
|
||||||
//if (speed < 20 && speed >= 10)
|
|
||||||
//{
|
|
||||||
// characterAnimator.speed = 0.8f;
|
|
||||||
//}
|
|
||||||
//if (speed >= 20)
|
|
||||||
//{
|
|
||||||
// characterAnimator.speed = 1f;
|
|
||||||
//}
|
|
||||||
if (totalDistance >= mapData.TotalDistance)
|
if (totalDistance >= mapData.TotalDistance)
|
||||||
{
|
{
|
||||||
characterAnimator.SetBool("ReachEnd", true);//到达终点
|
characterAnimator.SetBool("ReachEnd", true);//到达终点
|
||||||
@ -176,7 +169,7 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//游戏开始开关
|
//游戏开始开关
|
||||||
protected virtual bool GetStart()
|
public virtual bool GetStart()
|
||||||
{
|
{
|
||||||
return mainController.isStart;
|
return mainController.isStart;
|
||||||
}
|
}
|
||||||
@ -252,16 +245,18 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
public Quaternion currentRotation;
|
public Quaternion currentRotation;
|
||||||
IEnumerator LookAtNextPos()
|
IEnumerator LookAtNextPos()
|
||||||
{
|
{
|
||||||
Quaternion neededRotation = Quaternion.LookRotation(prePos - nextPos);
|
if (prePos != nextPos)
|
||||||
//Quaternion thisRotation = character.transform.localRotation;
|
|
||||||
|
|
||||||
float t = 0;
|
|
||||||
while (t < 1.0f)
|
|
||||||
{
|
{
|
||||||
t += Time.deltaTime / 0.5f;
|
Quaternion neededRotation = Quaternion.LookRotation(prePos - nextPos);
|
||||||
currentRotation = Quaternion.Slerp(thisRotation, neededRotation, t);
|
|
||||||
character.transform.rotation = Quaternion.Euler(0, currentRotation.eulerAngles.y, 0);
|
float t = 0;
|
||||||
yield return null;
|
while (t < 1.0f)
|
||||||
|
{
|
||||||
|
t += Time.deltaTime / 0.5f;
|
||||||
|
currentRotation = Quaternion.Slerp(thisRotation, neededRotation, t);
|
||||||
|
character.transform.rotation = Quaternion.Euler(0, currentRotation.eulerAngles.y, 0);
|
||||||
|
yield return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Vector3 deltaPos = Vector3.zero;
|
Vector3 deltaPos = Vector3.zero;
|
||||||
@ -285,13 +280,8 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
t += Time.deltaTime;
|
t += Time.deltaTime;
|
||||||
|
|
||||||
Vector3 v = Vector3.Lerp(prePos, nextPos, t);
|
Vector3 v = Vector3.Lerp(prePos, nextPos, t);
|
||||||
//Vector3 nextPosition = new Vector3((float)Math.Round(v.x, 2), (float)Math.Round(v.y, 2), (float)Math.Round(v.z, 2));
|
currentPos = v;
|
||||||
//if (!nextPosition.Equals(transform.localPosition))
|
transform.localPosition = v;
|
||||||
{
|
|
||||||
currentPos = v;
|
|
||||||
transform.localPosition = v;
|
|
||||||
//Camera.main.transform.localPosition = nextPosition;
|
|
||||||
}
|
|
||||||
yield return new WaitForEndOfFrame();
|
yield return new WaitForEndOfFrame();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -329,8 +329,8 @@ public class CyclingController : DeviceServiceMonoBase
|
|||||||
{
|
{
|
||||||
item.IsShowInfo = false;
|
item.IsShowInfo = false;
|
||||||
}
|
}
|
||||||
var frontPlayer = others.Where(c => c.TotalDistance - playerController.TotalDistance < 0.5 && c.TotalDistance - playerController.TotalDistance >= 0 && !(c is PlayerController)).OrderBy(c=>c.TotalDistance).FirstOrDefault();
|
var frontPlayer = others.Where(c => c.TotalDistance - playerController.TotalDistance < 0.25 && c.TotalDistance - playerController.TotalDistance >= 0 && !(c is PlayerController)).OrderBy(c=>c.TotalDistance).FirstOrDefault();
|
||||||
var bakePlayer = others.Where(c => c.TotalDistance - playerController.TotalDistance >-0.5 && c.TotalDistance - playerController.TotalDistance < 0 && !(c is PlayerController)).OrderByDescending(c=>c.TotalDistance).FirstOrDefault();
|
var bakePlayer = others.Where(c => c.TotalDistance - playerController.TotalDistance >-0.25 && c.TotalDistance - playerController.TotalDistance < 0 && !(c is PlayerController)).OrderByDescending(c=>c.TotalDistance).FirstOrDefault();
|
||||||
if(frontPlayer != null)
|
if(frontPlayer != null)
|
||||||
frontPlayer.IsShowInfo = true;
|
frontPlayer.IsShowInfo = true;
|
||||||
if (bakePlayer != null)
|
if (bakePlayer != null)
|
||||||
|
|||||||
@ -23,6 +23,7 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
{
|
{
|
||||||
get {
|
get {
|
||||||
var devices = AntConnector.Instance().discoveredDevices.Where(d => d.State == DeviceState.Connected && (d.Sensor == SensorType.Trainer));
|
var devices = AntConnector.Instance().discoveredDevices.Where(d => d.State == DeviceState.Connected && (d.Sensor == SensorType.Trainer));
|
||||||
|
_device = null;//重置设备状态
|
||||||
if (devices.Count() > 0)
|
if (devices.Count() > 0)
|
||||||
{
|
{
|
||||||
_device = devices.OrderByDescending(d => d.Sensor == SensorType.Trainer).First();
|
_device = devices.OrderByDescending(d => d.Sensor == SensorType.Trainer).First();
|
||||||
|
|||||||
@ -29,6 +29,8 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (!Directory.Exists(srcPath))
|
||||||
|
return;
|
||||||
DirectoryInfo dir = new DirectoryInfo(srcPath);
|
DirectoryInfo dir = new DirectoryInfo(srcPath);
|
||||||
FileSystemInfo[] fileinfo = dir.GetFileSystemInfos(); //返回目录中所有文件和子目录
|
FileSystemInfo[] fileinfo = dir.GetFileSystemInfos(); //返回目录中所有文件和子目录
|
||||||
foreach (FileSystemInfo i in fileinfo)
|
foreach (FileSystemInfo i in fileinfo)
|
||||||
|
|||||||
@ -23,6 +23,7 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
public PlayerController playerController;
|
public PlayerController playerController;
|
||||||
GameObject _mipMapRoute;
|
GameObject _mipMapRoute;
|
||||||
public RectTransform RectRoot;//rawImage
|
public RectTransform RectRoot;//rawImage
|
||||||
|
TrailRenderer trail;
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
cyclingCotroller = FindObjectOfType<CyclingController>();
|
cyclingCotroller = FindObjectOfType<CyclingController>();
|
||||||
@ -44,7 +45,13 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
}
|
}
|
||||||
RectRoot = transform.parent.Find("SingleUI/Panel/MiniMap/MiniMap").GetComponent<RectTransform>();
|
RectRoot = transform.parent.Find("SingleUI/Panel/MiniMap/MiniMap").GetComponent<RectTransform>();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
trail = transform.parent.Find("Sphere").GetComponent<TrailRenderer>();
|
||||||
|
trail.startWidth = 5f;
|
||||||
|
trail.endWidth = 5f;
|
||||||
|
trail.startColor = new Color(0.9764706f, 0.1882353f, 0.5254902f, 1f);
|
||||||
|
trail.endColor = new Color(0.9764706f, 0.1882353f, 0.5254902f, 1f);
|
||||||
|
}
|
||||||
float timer = 0;
|
float timer = 0;
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
@ -52,9 +59,12 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
{
|
{
|
||||||
var tr = transform.parent.Find("SingleUI/Panel/MiniMap/MiniMap/arrow");
|
var tr = transform.parent.Find("SingleUI/Panel/MiniMap/MiniMap/arrow");
|
||||||
tr.SetSiblingIndex(9999);
|
tr.SetSiblingIndex(9999);
|
||||||
_player.transform.localPosition = _map.GeoToWorldPosition(playerController.Currentlatlong);
|
var pos = _map.GeoToWorldPosition(playerController.Currentlatlong);
|
||||||
|
pos.y += 15f;
|
||||||
|
_player.transform.localPosition = pos;
|
||||||
Vector2 vp2 = _minicamera.WorldToViewportPoint(_player.transform.localPosition);//将三维物体的世界坐标转换为视口坐标
|
Vector2 vp2 = _minicamera.WorldToViewportPoint(_player.transform.localPosition);//将三维物体的世界坐标转换为视口坐标
|
||||||
((RectTransform)tr.transform).anchoredPosition = new Vector2((vp2.x * RectRoot.sizeDelta.x) - (RectRoot.sizeDelta.x * 0.5f), (vp2.y * RectRoot.sizeDelta.y) - (RectRoot.sizeDelta.y * 0.5f));
|
((RectTransform)tr.transform).anchoredPosition = new Vector2((vp2.x * RectRoot.sizeDelta.x) - (RectRoot.sizeDelta.x * 0.5f), (vp2.y * RectRoot.sizeDelta.y) - (RectRoot.sizeDelta.y * 0.5f));
|
||||||
|
trail.enabled = playerController.GetStart();
|
||||||
}
|
}
|
||||||
timer += Time.deltaTime;
|
timer += Time.deltaTime;
|
||||||
|
|
||||||
@ -81,7 +91,7 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
var point = mapData.List[i].Point;
|
var point = mapData.List[i].Point;
|
||||||
Vector3 item = _map.GeoToWorldPosition(new Vector2d(point[0], point[1]));
|
Vector3 item = _map.GeoToWorldPosition(new Vector2d(point[0], point[1]));
|
||||||
item.y += 5f;
|
item.y += 5f;
|
||||||
if (playerController.CurrentIndex >= i-1)
|
if (playerController.CurrentIndex >= i)
|
||||||
{
|
{
|
||||||
dat.Add(item);
|
dat.Add(item);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,6 +35,11 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
Vector2 vp2 = _minicamera.WorldToViewportPoint(transform.localPosition);//将三维物体的世界坐标转换为视口坐标
|
Vector2 vp2 = _minicamera.WorldToViewportPoint(transform.localPosition);//将三维物体的世界坐标转换为视口坐标
|
||||||
tr.anchoredPosition = new Vector2((vp2.x * RectRoot.sizeDelta.x) - (RectRoot.sizeDelta.x * 0.5f), (vp2.y * RectRoot.sizeDelta.y) - (RectRoot.sizeDelta.y * 0.5f));
|
tr.anchoredPosition = new Vector2((vp2.x * RectRoot.sizeDelta.x) - (RectRoot.sizeDelta.x * 0.5f), (vp2.y * RectRoot.sizeDelta.y) - (RectRoot.sizeDelta.y * 0.5f));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DestroyImmediate(arrow);
|
||||||
|
//DestroyImmediate(gameObject);
|
||||||
|
}
|
||||||
t = 1;
|
t = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,36 +10,61 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
public class NumberDotween:MonoBehaviour
|
public class NumberDotween:MonoBehaviour
|
||||||
{
|
{
|
||||||
private Sequence mScoreSequence;
|
private Sequence mScoreSequence;
|
||||||
|
private Sequence mProgressSequence;
|
||||||
private Text text;
|
private Text text;
|
||||||
private float mOldScore = 0;
|
private float mOldScore = 0;
|
||||||
|
private float mOldScoreNew = 0;
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
//函数内初始化
|
//函数内初始化
|
||||||
mScoreSequence = DOTween.Sequence();
|
mScoreSequence = DOTween.Sequence();
|
||||||
|
mProgressSequence = DOTween.Sequence();
|
||||||
//函数内设置属性
|
//函数内设置属性
|
||||||
mScoreSequence.SetAutoKill(false);
|
mScoreSequence.SetAutoKill(false);
|
||||||
|
mProgressSequence.SetAutoKill(false);
|
||||||
text = transform.GetComponent<Text>();
|
text = transform.GetComponent<Text>();
|
||||||
}
|
}
|
||||||
private double temp = 0;
|
private double temp = 0;
|
||||||
private int index = -1;
|
private int index = -1;
|
||||||
|
private int indexNew = -1;
|
||||||
public void AnimateNum(float newScore,double totalDistance,int currentIndex, int digit, string format,Image process)
|
public void AnimateNum(float newScore,double totalDistance,int currentIndex, int digit, string format,Image process)
|
||||||
{
|
{
|
||||||
if (currentIndex != index)
|
if (currentIndex != indexNew)
|
||||||
{
|
{
|
||||||
text.text = string.Format(format, totalDistance);
|
indexNew = currentIndex;
|
||||||
index = currentIndex;
|
|
||||||
process.fillAmount = 1;
|
process.fillAmount = 1;
|
||||||
StartCoroutine(CompleteFill(process));
|
StartCoroutine(CompleteFill(process));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
mProgressSequence.Append(DOTween.To(delegate (float value)
|
||||||
|
{
|
||||||
|
process.fillAmount = (float)(value / totalDistance);
|
||||||
|
}, mOldScoreNew, newScore, 1f));
|
||||||
|
//将更新后的值记录下来, 用于下一次滚动动画
|
||||||
|
mOldScoreNew = newScore;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AnimateNumText(float newScore, double totalDistance, int currentIndex, int digit, string format, Image process)
|
||||||
|
{
|
||||||
|
if (currentIndex != index)
|
||||||
|
{
|
||||||
|
text.text = string.Format(format, totalDistance);
|
||||||
|
index = currentIndex;
|
||||||
|
mOldScore = (float)totalDistance;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
mScoreSequence.Append(DOTween.To(delegate (float value)
|
mScoreSequence.Append(DOTween.To(delegate (float value)
|
||||||
{
|
{
|
||||||
temp = Math.Round(value, digit);
|
//if (value != newScore)
|
||||||
process.fillAmount = (float)(value / totalDistance);
|
{
|
||||||
//向Text组件赋值
|
temp = Math.Round(value, digit);
|
||||||
text.text = string.Format(format, temp);
|
//向Text组件赋值
|
||||||
|
text.text = string.Format(format, temp);
|
||||||
|
}
|
||||||
}, mOldScore, newScore, 1f));
|
}, mOldScore, newScore, 1f));
|
||||||
//将更新后的值记录下来, 用于下一次滚动动画
|
//将更新后的值记录下来, 用于下一次滚动动画
|
||||||
mOldScore = newScore;
|
mOldScore = newScore;
|
||||||
@ -48,7 +73,7 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
IEnumerator CompleteFill(Image process)
|
IEnumerator CompleteFill(Image process)
|
||||||
{
|
{
|
||||||
yield return new WaitForSeconds(0.3f);
|
yield return new WaitForSeconds(0.3f);
|
||||||
mOldScore = 0;
|
mOldScoreNew = 0;
|
||||||
process.fillAmount = 0;
|
process.fillAmount = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,7 +41,7 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
protected override bool GetStart()
|
public override bool GetStart()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -50,6 +50,8 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
currentlatlong = mainController.Along(totalDistance);//下一个坐标
|
currentlatlong = mainController.Along(totalDistance);//下一个坐标
|
||||||
|
|
||||||
diff = Math.Round((totalDistance - _playerController.TotalDistance) * 1000, 0);
|
diff = Math.Round((totalDistance - _playerController.TotalDistance) * 1000, 0);
|
||||||
|
|
||||||
|
MoveHead(graph.transform);
|
||||||
}
|
}
|
||||||
double diff = 0;
|
double diff = 0;
|
||||||
public void SetDataSource(double _totalDistance, double _distance,string Name,double weightKg)
|
public void SetDataSource(double _totalDistance, double _distance,string Name,double weightKg)
|
||||||
@ -147,7 +149,7 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
public void RemoveSelf()
|
public void RemoveSelf()
|
||||||
{
|
{
|
||||||
//headPanel?.SetActive(false);
|
//headPanel?.SetActive(false);
|
||||||
arrowImage.gameObject.SetActive(false);
|
arrowImage.gameObject?.Destroy();
|
||||||
headPanel?.Destroy();
|
headPanel?.Destroy();
|
||||||
infoPanel?.Destroy();
|
infoPanel?.Destroy();
|
||||||
transform.gameObject.Destroy();
|
transform.gameObject.Destroy();
|
||||||
@ -159,7 +161,7 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
{
|
{
|
||||||
var playerScreenPos = Camera.main.WorldToScreenPoint(transform.position);
|
var playerScreenPos = Camera.main.WorldToScreenPoint(transform.position);
|
||||||
((RectTransform)arrowImage.transform).position = playerScreenPos;
|
((RectTransform)arrowImage.transform).position = playerScreenPos;
|
||||||
MoveHead(graph.transform);
|
|
||||||
if (IsShowInfo)
|
if (IsShowInfo)
|
||||||
{
|
{
|
||||||
ShowInfoPanel(playerScreenPos);
|
ShowInfoPanel(playerScreenPos);
|
||||||
@ -168,10 +170,10 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
{
|
{
|
||||||
if (infoPanel == null)
|
if (infoPanel == null)
|
||||||
return;
|
return;
|
||||||
|
_directionsGO?.Destroy();
|
||||||
infoPanel.transform.GetComponent<CanvasGroup>().DOFade(0, 1).onComplete += () => {
|
infoPanel.transform.GetComponent<CanvasGroup>().DOFade(0, 1).onComplete += () => {
|
||||||
IsShowInfo = false;
|
IsShowInfo = false;
|
||||||
infoPanel?.Destroy();
|
infoPanel?.Destroy();
|
||||||
_directionsGO?.Destroy();
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -157,10 +157,10 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
{
|
{
|
||||||
if (infoPanel == null)
|
if (infoPanel == null)
|
||||||
return;
|
return;
|
||||||
|
_directionsGO?.Destroy();
|
||||||
infoPanel.transform.GetComponent<CanvasGroup>().DOFade(0, 1).onComplete += () => {
|
infoPanel.transform.GetComponent<CanvasGroup>().DOFade(0, 1).onComplete += () => {
|
||||||
IsShowInfo = false;
|
IsShowInfo = false;
|
||||||
infoPanel?.Destroy();
|
infoPanel?.Destroy();
|
||||||
_directionsGO?.Destroy();
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -43,16 +43,26 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
{
|
{
|
||||||
//计算数据
|
//计算数据
|
||||||
//speed = mainController.UpDateSpeed();
|
//speed = mainController.UpDateSpeed();
|
||||||
heartRate = mainController.UpDateHeart() ?? 0;
|
try
|
||||||
power = mainController.UpdatePower();
|
{
|
||||||
cadance = mainController.UpdateCadence();
|
heartRate = mainController.UpDateHeart() ?? 0;
|
||||||
weight = App.CurrentUser.Weight;
|
power = mainController.UpdatePower();
|
||||||
bicycleWeight = App.CurrentUser.BicycleWeight;
|
cadance = mainController.UpdateCadence();
|
||||||
|
weight = App.CurrentUser.Weight;
|
||||||
|
bicycleWeight = App.CurrentUser.BicycleWeight;
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
System.Random rd = new System.Random();
|
System.Random rd = new System.Random();
|
||||||
power = 500; //rd.Next(150, 300);////测试功率
|
power = rd.Next(150, 300);//测试功率
|
||||||
#endif
|
#endif
|
||||||
mainController.TrackResistance(currentSlope * App.rideSetting.sensitivity / 100);
|
mainController.TrackResistance(currentSlope * App.rideSetting.sensitivity / 100);
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
heartRate = 0;
|
||||||
|
power = 0;
|
||||||
|
cadance = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (power > 0)
|
if (power > 0)
|
||||||
{
|
{
|
||||||
speed = Helper.CalculateSpeed(elevation, currentSlope, power, weight, bicycleWeight);
|
speed = Helper.CalculateSpeed(elevation, currentSlope, power, weight, bicycleWeight);
|
||||||
|
|||||||
@ -403,42 +403,31 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
nextSlopeDistanceText.text = $"{Math.Round(playerController.NextSlopeTotalDistance, 0)}M";
|
nextSlopeDistanceText.text = $"{Math.Round(playerController.NextSlopeTotalDistance, 0)}M";
|
||||||
currentSlopeText.text = Math.Round(playerController.CurrentSlope, 1).ToString() + "%";
|
currentSlopeText.text = Math.Round(playerController.CurrentSlope, 1).ToString() + "%";
|
||||||
currentSlopeDistanceText.GetComponent<NumberDotween>().AnimateNum((float)playerController.CurrentSlopeDistance, Math.Round(playerController.CurrentDistance, 0), playerController.CurrentIndex, 0, "{0}M", currentSlopeProcess);
|
currentSlopeDistanceText.GetComponent<NumberDotween>().AnimateNum((float)playerController.CurrentSlopeDistance, Math.Round(playerController.CurrentDistance, 0), playerController.CurrentIndex, 0, "{0}M", currentSlopeProcess);
|
||||||
|
currentSlopeDistanceText.GetComponent<NumberDotween>().AnimateNumText((float)playerController.CurrentDistance - (float)playerController.CurrentSlopeDistance, Math.Round(playerController.CurrentDistance, 0), playerController.CurrentIndex, 0, "{0}M", currentSlopeProcess);
|
||||||
totalClimb.text = Math.Round(playerController.TotalClimb, 0).ToString();
|
totalClimb.text = Math.Round(playerController.TotalClimb, 0).ToString();
|
||||||
//小地图进度
|
//小地图进度
|
||||||
var process = (float)(playerController.TotalDistance / routeInstance.Distance);
|
var process = (float)(playerController.TotalDistance / routeInstance.Distance);
|
||||||
miniMapProcess.fillAmount = process;
|
miniMapProcess.fillAmount = process;
|
||||||
miniMapProcessText.text = $"{process*100:f0}%";
|
miniMapProcessText.text = $"{process*100:f0}%";
|
||||||
//动态改变坡度图片
|
//动态改变坡度图片
|
||||||
ChangeSlopeImage();
|
ChangeSlopeImage(nextSlopeImage, playerController.NextSlope);
|
||||||
|
ChangeSlopeImage(currentSlopeImage, playerController.CurrentSlope);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ChangeSlopeImage()
|
private void ChangeSlopeImage(Image image,double slope)
|
||||||
{
|
{
|
||||||
if (playerController.CurrentSlope >= 1)
|
if (slope >= 1)
|
||||||
{
|
{
|
||||||
currentSlopeImage.sprite = uphill1;
|
image.sprite = uphill1;
|
||||||
}
|
}
|
||||||
else if (playerController.CurrentSlope > -1 || playerController.CurrentSlope < 1)
|
else if (slope > -1 && slope < 1)
|
||||||
{
|
{
|
||||||
currentSlopeImage.sprite = straight;
|
image.sprite = straight;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
currentSlopeImage.sprite = downhill1;
|
image.sprite = downhill1;
|
||||||
}
|
|
||||||
//下一个坡度
|
|
||||||
if (playerController.NextSlope >= 1)
|
|
||||||
{
|
|
||||||
nextSlopeImage.sprite = uphill1Small;
|
|
||||||
}
|
|
||||||
else if (playerController.NextSlope > -1 || playerController.NextSlope < 1)
|
|
||||||
{
|
|
||||||
nextSlopeImage.sprite = straightSmall;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
nextSlopeImage.sprite = downhill1Small;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//重置游戏
|
//重置游戏
|
||||||
@ -476,15 +465,16 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
|
|
||||||
public void StartRide(BaseEventData baseEventData)
|
public void StartRide(BaseEventData baseEventData)
|
||||||
{
|
{
|
||||||
var antConnected = mainController.CheckAnt();//初始化ant+设备
|
// var antConnected = mainController.CheckAnt();//初始化ant+设备
|
||||||
#if UNITY_EDITOR
|
//#if UNITY_EDITOR
|
||||||
antConnected = true;
|
// antConnected = true;
|
||||||
#endif
|
//#endif
|
||||||
if (!antConnected)
|
// if (!antConnected)
|
||||||
|
// {
|
||||||
|
// alertPanel.SetActive(true);
|
||||||
|
// }
|
||||||
|
// else
|
||||||
{
|
{
|
||||||
alertPanel.SetActive(true);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
//加个5秒钟倒计时
|
//加个5秒钟倒计时
|
||||||
count = 5;
|
count = 5;
|
||||||
startPanel.SetActive(false);
|
startPanel.SetActive(false);
|
||||||
@ -573,7 +563,7 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
{
|
{
|
||||||
clearLock = true;
|
clearLock = true;
|
||||||
isSimple *= -1;
|
isSimple *= -1;
|
||||||
simpleBtn.transform.GetComponent<Image>().sprite = isSimple == -1 ? Resources.Load<Sprite>("Images/Ride/full") : Resources.Load<Sprite>("Images/Ride/simple");
|
simpleBtn.transform.GetComponent<Image>().sprite = isSimple == -1 ? Resources.Load<Sprite>("Images/Ride/full 1") : Resources.Load<Sprite>("Images/Ride/simple 1");
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
137
Assets/Scripts/UI/Prefab/ResultList/LocalRouteItem.cs
Normal file
137
Assets/Scripts/UI/Prefab/ResultList/LocalRouteItem.cs
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
using Assets.Scripts;
|
||||||
|
using Assets.Scripts.Apis.Models;
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.EventSystems;
|
||||||
|
using UnityEngine.SceneManagement;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
using Assets.Scripts.Apis;
|
||||||
|
using Assets.Scenes.Ride.Scripts;
|
||||||
|
|
||||||
|
public class LocalRouteItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler
|
||||||
|
{
|
||||||
|
MapInterruptRecord record;
|
||||||
|
// Start is called before the first frame update
|
||||||
|
Transform left,row1,row2,right;
|
||||||
|
Transform btnReRide, btnContinue, btnDelete;
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
string titleColor = "#5c5c6e";
|
||||||
|
RouteResult data;
|
||||||
|
//滑动索引 0route 1match
|
||||||
|
int index;
|
||||||
|
List<string> listFileName = new List<string>();
|
||||||
|
string path;
|
||||||
|
public void Initial(string path,int index)
|
||||||
|
{
|
||||||
|
this.path = path;
|
||||||
|
this.index = index;
|
||||||
|
var Name = transform.Find("Left/Main/Name").GetComponent<Text>();
|
||||||
|
var Time = transform.Find("Left/Main/Time").GetComponent<Text>();
|
||||||
|
var RidingTime = transform.Find("Left/Main/Row1/Time").GetComponent<Text>();
|
||||||
|
var RidingDistance = transform.Find("Left/Main/Row1/Distance").GetComponent<Text>();
|
||||||
|
var Device = transform.Find("Left/Main/Row2/Device").GetComponent<Text>();
|
||||||
|
var recordImage = transform.Find("CoverImage").GetComponent<RawImage>();
|
||||||
|
var uploadBtn = transform.Find("Right/BtnContinue").GetComponent<Button>();
|
||||||
|
var deleteBtn = transform.Find("Right/BtnDelete").GetComponent<Button>();
|
||||||
|
UIManager.AddEvent(uploadBtn.gameObject, EventTriggerType.PointerClick, (b) => GoUplaod());
|
||||||
|
UIManager.AddEvent(deleteBtn.gameObject, EventTriggerType.PointerClick, (b) => GoDelete());
|
||||||
|
var fileList = Directory.GetFiles(path);
|
||||||
|
foreach (var item in fileList)
|
||||||
|
{
|
||||||
|
var fileInfo = new FileInfo(item);
|
||||||
|
//显示封面图片
|
||||||
|
if (fileInfo.Extension.ToLower().Equals(".png"))
|
||||||
|
{
|
||||||
|
var fileStream = fileInfo.OpenRead();
|
||||||
|
fileStream.Seek(0, SeekOrigin.Begin);
|
||||||
|
byte[] bytes = new byte[fileStream.Length];
|
||||||
|
fileStream.Read(bytes, 0, (int)fileStream.Length);
|
||||||
|
fileStream.Close();
|
||||||
|
fileStream.Dispose();
|
||||||
|
Texture2D texture = new Texture2D(800, 450);
|
||||||
|
texture.LoadImage(bytes);
|
||||||
|
recordImage.texture = texture;
|
||||||
|
}
|
||||||
|
//显示骑行记录实体
|
||||||
|
if (fileInfo.Name.Equals("record.txt"))
|
||||||
|
{
|
||||||
|
var recordStr = File.ReadAllText(item);
|
||||||
|
record = Newtonsoft.Json.JsonConvert.DeserializeObject<MapInterruptRecord>(recordStr);
|
||||||
|
Name.text = record.RouteName;
|
||||||
|
Time.text = record.StartTime.ToString();
|
||||||
|
RidingTime.text = $"<color={titleColor}>Riding time:</color>{record.Ticks}";
|
||||||
|
RidingDistance.text = $"<color={titleColor}>Mileage:</color>{record.EndDistance.ToString("#0.00")}KM";
|
||||||
|
Device.text = $"<color={titleColor}>Cycling equipment:</color>{record.ManufacturerName}";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
listFileName.Add(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void GoUplaod()
|
||||||
|
{
|
||||||
|
UIManager.ShowConfirm("Upload", "Upload the local record?", () =>
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
MapInterruptRecordApi service = new MapInterruptRecordApi();
|
||||||
|
var result = service.Add(record, listFileName);
|
||||||
|
//删除文件
|
||||||
|
UIManager.CloseConfirm();
|
||||||
|
if (result.result)
|
||||||
|
{
|
||||||
|
Helper.DelectDir(path);
|
||||||
|
DestroyImmediate(gameObject);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Utils.showToast(gameObject, result.errMsg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Utils.showToast(gameObject, e.Message);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
void GoDelete()
|
||||||
|
{
|
||||||
|
if (!Directory.Exists(path))
|
||||||
|
return;
|
||||||
|
UIManager.ShowConfirm("Delete", "Delete the local record?", () =>
|
||||||
|
{
|
||||||
|
//删除文件
|
||||||
|
try
|
||||||
|
{
|
||||||
|
UIManager.CloseConfirm();
|
||||||
|
Helper.DelectDir(path);
|
||||||
|
DestroyImmediate(gameObject);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Utils.showToast(gameObject, e.Message);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public void OnPointerExit(PointerEventData eventData)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
public void OnPointerEnter(PointerEventData eventData)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Scripts/UI/Prefab/ResultList/LocalRouteItem.cs.meta
Normal file
11
Assets/Scripts/UI/Prefab/ResultList/LocalRouteItem.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b2305835a4128974baaed486343c2b37
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -4,6 +4,7 @@ using Assets.Scripts.Apis.Models;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.EventSystems;
|
using UnityEngine.EventSystems;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
@ -11,6 +12,7 @@ using UnityEngine.UI;
|
|||||||
public class ResultListController : MonoBehaviour
|
public class ResultListController : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField]Transform routeResult;
|
[SerializeField]Transform routeResult;
|
||||||
|
Transform localRouteItem;
|
||||||
Transform scrollContent;
|
Transform scrollContent;
|
||||||
Transform routeScroll, matchScroll;
|
Transform routeScroll, matchScroll;
|
||||||
Transform routeContent, matchContent;
|
Transform routeContent, matchContent;
|
||||||
@ -38,6 +40,7 @@ public class ResultListController : MonoBehaviour
|
|||||||
matchScroll = scrollContent.Find("MatchList");
|
matchScroll = scrollContent.Find("MatchList");
|
||||||
matchContent = matchScroll.Find("Viewport").Find("Content");
|
matchContent = matchScroll.Find("Viewport").Find("Content");
|
||||||
contents = new Transform[] { routeContent, matchContent};
|
contents = new Transform[] { routeContent, matchContent};
|
||||||
|
localRouteItem = Resources.Load<Transform>("UI/Prefab/ResultList/LocalRouteItem");
|
||||||
if (btnMatch != null)
|
if (btnMatch != null)
|
||||||
{
|
{
|
||||||
UIManager.AddEvent(btnMatch.gameObject, EventTriggerType.PointerClick, (b) =>
|
UIManager.AddEvent(btnMatch.gameObject, EventTriggerType.PointerClick, (b) =>
|
||||||
@ -161,8 +164,10 @@ public class ResultListController : MonoBehaviour
|
|||||||
{
|
{
|
||||||
isEnd[index] = false;
|
isEnd[index] = false;
|
||||||
DisplayRouteResult(r.data, contents[index],index);
|
DisplayRouteResult(r.data, contents[index],index);
|
||||||
|
DisplayLocalRouteResult(contents[index], index);//显示本地未上传成功的记录
|
||||||
scroll.transform.Find("Error").gameObject.SetActive(false);
|
scroll.transform.Find("Error").gameObject.SetActive(false);
|
||||||
//DisplayRouteResult(r.data, matchContent);
|
//DisplayRouteResult(r.data, matchContent);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -184,6 +189,30 @@ public class ResultListController : MonoBehaviour
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
void DisplayLocalRouteResult(Transform content, int index)
|
||||||
|
{
|
||||||
|
//查询本地上传失败的文件
|
||||||
|
var parentPath = PFConstants.MapWorkoutRecordFolder;
|
||||||
|
var dirList = Directory.GetDirectories(parentPath);
|
||||||
|
foreach (var item in dirList)
|
||||||
|
{
|
||||||
|
if (Directory.Exists(item))
|
||||||
|
{
|
||||||
|
var d = new DirectoryInfo(item);
|
||||||
|
//var createTime = d.CreationTime;//create time
|
||||||
|
//var newTime = createTime.AddSeconds(30D);
|
||||||
|
//if (newTime < DateTime.Now)
|
||||||
|
{
|
||||||
|
var obj = Instantiate(localRouteItem);
|
||||||
|
obj.GetComponent<LocalRouteItem>().Initial(item, 0);
|
||||||
|
obj.transform.parent = content;
|
||||||
|
obj.transform.localScale = new Vector3(1, 1, 1);
|
||||||
|
obj.SetAsFirstSibling();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void InitialColor()
|
void InitialColor()
|
||||||
{
|
{
|
||||||
ColorUtility.TryParseHtmlString("#FFFFFF", out c1);
|
ColorUtility.TryParseHtmlString("#FFFFFF", out c1);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user