伴侣骑行
This commit is contained in:
parent
34cde86a28
commit
7744eec847
BIN
Assets/Resources/Images/Ride/login_delete.png
Normal file
BIN
Assets/Resources/Images/Ride/login_delete.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
104
Assets/Resources/Images/Ride/login_delete.png.meta
Normal file
104
Assets/Resources/Images/Ride/login_delete.png.meta
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9b64d9c84fa3a134e99753a34c57d896
|
||||||
|
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:
|
||||||
121
Assets/Resources/UI/Prefab/Ride/MiniMapPlayer.prefab
Normal file
121
Assets/Resources/UI/Prefab/Ride/MiniMapPlayer.prefab
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &3777003654129381334
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1071719248032103250}
|
||||||
|
- component: {fileID: 3858065105225717245}
|
||||||
|
- component: {fileID: 5185219856377304635}
|
||||||
|
- component: {fileID: 4903918593435181691}
|
||||||
|
- component: {fileID: 7093856445096229025}
|
||||||
|
- component: {fileID: 3177058153207947917}
|
||||||
|
m_Layer: 9
|
||||||
|
m_Name: MiniMapPlayer
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1071719248032103250
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3777003654129381334}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 2, y: 5, z: 2}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!33 &3858065105225717245
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3777003654129381334}
|
||||||
|
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!23 &5185219856377304635
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3777003654129381334}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 0
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 9c84f71e98b0047259dedc9428260078, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
--- !u!135 &4903918593435181691
|
||||||
|
SphereCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3777003654129381334}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Radius: 0.5
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &7093856445096229025
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3777003654129381334}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 287bd44099b0d56478ff1fe696796816, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
--- !u!114 &3177058153207947917
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3777003654129381334}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 287bd44099b0d56478ff1fe696796816, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
@ -1,7 +1,6 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 95a41acefc4f5e04a9a456f8ce06938e
|
guid: 6a62db43966648741a65de516b20c9c9
|
||||||
folderAsset: yes
|
PrefabImporter:
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
||||||
394
Assets/Resources/UI/Prefab/Ride/ReviewItem.prefab
Normal file
394
Assets/Resources/UI/Prefab/Ride/ReviewItem.prefab
Normal file
@ -0,0 +1,394 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &912708215454154076
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1845217323250165704}
|
||||||
|
- component: {fileID: 6156959354100317510}
|
||||||
|
- component: {fileID: 1751857502339480251}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Spilit
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &1845217323250165704
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 912708215454154076}
|
||||||
|
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: 6375313706947276174}
|
||||||
|
m_RootOrder: 3
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0.5, y: 0}
|
||||||
|
m_AnchorMax: {x: 0.5, y: 0}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0.5}
|
||||||
|
m_SizeDelta: {x: 244, y: 1}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &6156959354100317510
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 912708215454154076}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &1751857502339480251
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 912708215454154076}
|
||||||
|
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.2784314, g: 0.2784314, b: 0.34901962, 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 &6375313706153414260
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 6375313706153414263}
|
||||||
|
- component: {fileID: 6375313706153414257}
|
||||||
|
- component: {fileID: 6375313706153414262}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Distance
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &6375313706153414263
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6375313706153414260}
|
||||||
|
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: 6375313706947276174}
|
||||||
|
m_RootOrder: 2
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 1, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 1, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: -40, y: 0}
|
||||||
|
m_SizeDelta: {x: 80, y: 34}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &6375313706153414257
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6375313706153414260}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &6375313706153414262
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6375313706153414260}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_FontData:
|
||||||
|
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_FontSize: 24
|
||||||
|
m_FontStyle: 1
|
||||||
|
m_BestFit: 0
|
||||||
|
m_MinSize: 2
|
||||||
|
m_MaxSize: 40
|
||||||
|
m_Alignment: 5
|
||||||
|
m_AlignByGeometry: 0
|
||||||
|
m_RichText: 0
|
||||||
|
m_HorizontalOverflow: 1
|
||||||
|
m_VerticalOverflow: 0
|
||||||
|
m_LineSpacing: 1
|
||||||
|
m_Text: New Text
|
||||||
|
--- !u!1 &6375313706613039512
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 6375313706613039515}
|
||||||
|
- component: {fileID: 6375313706613039493}
|
||||||
|
- component: {fileID: 6375313706613039514}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Name
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &6375313706613039515
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6375313706613039512}
|
||||||
|
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: 6375313706947276174}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: 95.5, y: 0}
|
||||||
|
m_SizeDelta: {x: 99, y: 17}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &6375313706613039493
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6375313706613039512}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &6375313706613039514
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6375313706613039512}
|
||||||
|
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.61960787, g: 0.61960787, b: 0.6784314, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_FontData:
|
||||||
|
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_FontSize: 12
|
||||||
|
m_FontStyle: 1
|
||||||
|
m_BestFit: 0
|
||||||
|
m_MinSize: 1
|
||||||
|
m_MaxSize: 40
|
||||||
|
m_Alignment: 3
|
||||||
|
m_AlignByGeometry: 0
|
||||||
|
m_RichText: 1
|
||||||
|
m_HorizontalOverflow: 0
|
||||||
|
m_VerticalOverflow: 0
|
||||||
|
m_LineSpacing: 1
|
||||||
|
m_Text: sddsad
|
||||||
|
--- !u!1 &6375313706942272804
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 6375313706942272807}
|
||||||
|
- component: {fileID: 6375313706942272801}
|
||||||
|
- component: {fileID: 6375313706942272806}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Head
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &6375313706942272807
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6375313706942272804}
|
||||||
|
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: 6375313706947276174}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: 18, y: 0}
|
||||||
|
m_SizeDelta: {x: 36, y: 36}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &6375313706942272801
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6375313706942272804}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &6375313706942272806
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6375313706942272804}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_UVRect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
width: 1
|
||||||
|
height: 1
|
||||||
|
--- !u!1 &6375313706947276175
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 6375313706947276174}
|
||||||
|
- component: {fileID: 6375313706947276168}
|
||||||
|
- component: {fileID: 6375313706947276169}
|
||||||
|
- component: {fileID: 1719244800316984560}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: ReviewItem
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &6375313706947276174
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6375313706947276175}
|
||||||
|
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: 6375313706942272807}
|
||||||
|
- {fileID: 6375313706613039515}
|
||||||
|
- {fileID: 6375313706153414263}
|
||||||
|
- {fileID: 1845217323250165704}
|
||||||
|
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: 243.27567, y: 55.304443}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &6375313706947276168
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6375313706947276175}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &6375313706947276169
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6375313706947276175}
|
||||||
|
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: 0}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_Type: 1
|
||||||
|
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!114 &1719244800316984560
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6375313706947276175}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: c0767437c87622348a0b98bbc0c7dc51, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
7
Assets/Resources/UI/Prefab/Ride/ReviewItem.prefab.meta
Normal file
7
Assets/Resources/UI/Prefab/Ride/ReviewItem.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1d5af0bf770b49c44b5c5cea411274f9
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
111
Assets/Resources/UI/Prefab/Ride/ReviewPlayer.prefab
Normal file
111
Assets/Resources/UI/Prefab/Ride/ReviewPlayer.prefab
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &1056360222971152080
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1056360222971152087}
|
||||||
|
- component: {fileID: 1056360222971152091}
|
||||||
|
- component: {fileID: 1056360222971152084}
|
||||||
|
- component: {fileID: 1056360222971152085}
|
||||||
|
- component: {fileID: 1056360222971152086}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: ReviewPlayer
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1056360222971152087
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1056360222971152080}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!33 &1056360222971152091
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1056360222971152080}
|
||||||
|
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!23 &1056360222971152084
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1056360222971152080}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
--- !u!135 &1056360222971152085
|
||||||
|
SphereCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1056360222971152080}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Radius: 0.5
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &1056360222971152086
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1056360222971152080}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: cf37eca46d898384fa2d9e17dfa3e25e, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
character: {fileID: 1056360222971152080}
|
||||||
|
characterAnimator: {fileID: 0}
|
||||||
|
CurrentIndex: 0
|
||||||
7
Assets/Resources/UI/Prefab/Ride/ReviewPlayer.prefab.meta
Normal file
7
Assets/Resources/UI/Prefab/Ride/ReviewPlayer.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d0f1bdcedf64f714d9d9ab682669eeea
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
377
Assets/Resources/UI/Prefab/Ride/SelectPlayerItem.prefab
Normal file
377
Assets/Resources/UI/Prefab/Ride/SelectPlayerItem.prefab
Normal file
@ -0,0 +1,377 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &8411558192216138181
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 8411558192216138180}
|
||||||
|
- component: {fileID: 8411558192216138186}
|
||||||
|
- component: {fileID: 8411558192216138187}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Head
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &8411558192216138180
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8411558192216138181}
|
||||||
|
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: 8411558192340730122}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: 28, y: 0}
|
||||||
|
m_SizeDelta: {x: 36, y: 36}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &8411558192216138186
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8411558192216138181}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &8411558192216138187
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8411558192216138181}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_UVRect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
width: 1
|
||||||
|
height: 1
|
||||||
|
--- !u!1 &8411558192340730123
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 8411558192340730122}
|
||||||
|
- component: {fileID: 8411558192340730127}
|
||||||
|
- component: {fileID: 8411558192340730120}
|
||||||
|
- component: {fileID: 8411558192340730121}
|
||||||
|
- component: {fileID: 8411558192340730126}
|
||||||
|
- component: {fileID: 8226293288482667654}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: SelectPlayerItem
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &8411558192340730122
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8411558192340730123}
|
||||||
|
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: 8411558192216138180}
|
||||||
|
- {fileID: 8411558193619762830}
|
||||||
|
- {fileID: 8411558194076291262}
|
||||||
|
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: 0, y: 0}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &8411558192340730127
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8411558192340730123}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &8411558192340730120
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8411558192340730123}
|
||||||
|
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.20784314, g: 0.20784314, b: 0.2627451, a: 0.6509804}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_Sprite: {fileID: 0}
|
||||||
|
m_Type: 1
|
||||||
|
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!114 &8411558192340730121
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8411558192340730123}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: adb30198aa32dd140b5750692dd48104, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
radius: 20
|
||||||
|
--- !u!114 &8411558192340730126
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8411558192340730123}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Navigation:
|
||||||
|
m_Mode: 3
|
||||||
|
m_SelectOnUp: {fileID: 0}
|
||||||
|
m_SelectOnDown: {fileID: 0}
|
||||||
|
m_SelectOnLeft: {fileID: 0}
|
||||||
|
m_SelectOnRight: {fileID: 0}
|
||||||
|
m_Transition: 1
|
||||||
|
m_Colors:
|
||||||
|
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||||
|
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, 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_ColorMultiplier: 1
|
||||||
|
m_FadeDuration: 0.1
|
||||||
|
m_SpriteState:
|
||||||
|
m_HighlightedSprite: {fileID: 0}
|
||||||
|
m_PressedSprite: {fileID: 0}
|
||||||
|
m_SelectedSprite: {fileID: 0}
|
||||||
|
m_DisabledSprite: {fileID: 0}
|
||||||
|
m_AnimationTriggers:
|
||||||
|
m_NormalTrigger: Normal
|
||||||
|
m_HighlightedTrigger: Highlighted
|
||||||
|
m_PressedTrigger: Pressed
|
||||||
|
m_SelectedTrigger: Selected
|
||||||
|
m_DisabledTrigger: Disabled
|
||||||
|
m_Interactable: 1
|
||||||
|
m_TargetGraphic: {fileID: 8411558192340730120}
|
||||||
|
m_OnClick:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
--- !u!114 &8226293288482667654
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8411558192340730123}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 1a77881c6394b0947b40b398dcdcc7db, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
--- !u!1 &8411558193619762831
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 8411558193619762830}
|
||||||
|
- component: {fileID: 8411558193619762828}
|
||||||
|
- component: {fileID: 8411558193619762829}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Name
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &8411558193619762830
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8411558193619762831}
|
||||||
|
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: 8411558192340730122}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: 105.5, y: -0.00000047683716}
|
||||||
|
m_SizeDelta: {x: 99, y: 17}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &8411558193619762828
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8411558193619762831}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &8411558193619762829
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8411558193619762831}
|
||||||
|
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.61960787, g: 0.61960787, b: 0.6784314, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_FontData:
|
||||||
|
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_FontSize: 12
|
||||||
|
m_FontStyle: 1
|
||||||
|
m_BestFit: 0
|
||||||
|
m_MinSize: 1
|
||||||
|
m_MaxSize: 40
|
||||||
|
m_Alignment: 3
|
||||||
|
m_AlignByGeometry: 0
|
||||||
|
m_RichText: 1
|
||||||
|
m_HorizontalOverflow: 0
|
||||||
|
m_VerticalOverflow: 0
|
||||||
|
m_LineSpacing: 1
|
||||||
|
m_Text: New Text
|
||||||
|
--- !u!1 &8411558194076291263
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 8411558194076291262}
|
||||||
|
- component: {fileID: 8411558194076291260}
|
||||||
|
- component: {fileID: 8411558194076291261}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Timer
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &8411558194076291262
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8411558194076291263}
|
||||||
|
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: 8411558192340730122}
|
||||||
|
m_RootOrder: 2
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 1, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 1, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: -55.5, y: 0}
|
||||||
|
m_SizeDelta: {x: 67, y: 22}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &8411558194076291260
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8411558194076291263}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &8411558194076291261
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8411558194076291263}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_FontData:
|
||||||
|
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_FontSize: 16
|
||||||
|
m_FontStyle: 1
|
||||||
|
m_BestFit: 0
|
||||||
|
m_MinSize: 10
|
||||||
|
m_MaxSize: 40
|
||||||
|
m_Alignment: 5
|
||||||
|
m_AlignByGeometry: 0
|
||||||
|
m_RichText: 1
|
||||||
|
m_HorizontalOverflow: 0
|
||||||
|
m_VerticalOverflow: 0
|
||||||
|
m_LineSpacing: 1
|
||||||
|
m_Text: 01:08:99
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2ec9eee4dd74494429c7c1e12028383f
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
File diff suppressed because it is too large
Load Diff
@ -21,7 +21,7 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
GameObject character;
|
GameObject character;
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
Animator characterAnimator;
|
Animator characterAnimator;
|
||||||
[SerializeField]
|
|
||||||
AbstractMap map;
|
AbstractMap map;
|
||||||
//AbstractMap map;
|
//AbstractMap map;
|
||||||
|
|
||||||
@ -55,7 +55,9 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
protected double distance;
|
protected double distance;
|
||||||
protected double currentSlopeDistance;
|
protected double currentSlopeDistance;
|
||||||
protected double lastEndDistance;
|
protected double lastEndDistance;
|
||||||
|
protected double totalClimb;
|
||||||
|
|
||||||
|
public double TotalClimb { get => totalClimb; }
|
||||||
public int UserId { get => userId; }
|
public int UserId { get => userId; }
|
||||||
public bool IsStart { get => isStart; }
|
public bool IsStart { get => isStart; }
|
||||||
public double Speed { get => speed; }
|
public double Speed { get => speed; }
|
||||||
@ -78,18 +80,21 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
public void SetStart()
|
public void SetStart()
|
||||||
{
|
{
|
||||||
isStart = true;
|
isStart = true;
|
||||||
|
mainController.isStart = true;
|
||||||
startTime = DateTime.Now;
|
startTime = DateTime.Now;
|
||||||
}
|
}
|
||||||
//继续骑行
|
//继续骑行
|
||||||
public void SetContinue()
|
public void SetContinue()
|
||||||
{
|
{
|
||||||
isStart = true;
|
isStart = true;
|
||||||
|
mainController.isStart = true;
|
||||||
}
|
}
|
||||||
//暂停骑行
|
//暂停骑行
|
||||||
public void SetPause()
|
public void SetPause()
|
||||||
{
|
{
|
||||||
isStart = false;
|
isStart = false;
|
||||||
characterAnimator.SetBool("IsRide", false);
|
mainController.isStart = false;
|
||||||
|
//characterAnimator.SetBool("IsRide", false);
|
||||||
}
|
}
|
||||||
//退出或者完成骑行
|
//退出或者完成骑行
|
||||||
public void SetQuit()
|
public void SetQuit()
|
||||||
@ -108,10 +113,7 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
{
|
{
|
||||||
Excute();
|
Excute();
|
||||||
}
|
}
|
||||||
private void FixedUpdate()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
#region 骑行逻辑
|
#region 骑行逻辑
|
||||||
//初始化骑行数据
|
//初始化骑行数据
|
||||||
protected CyclingController mainController;
|
protected CyclingController mainController;
|
||||||
@ -120,10 +122,11 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
{
|
{
|
||||||
characterAnimator = GetComponentInChildren<Animator>();
|
characterAnimator = GetComponentInChildren<Animator>();
|
||||||
mainController = transform.parent.GetComponent<CyclingController>();
|
mainController = transform.parent.GetComponent<CyclingController>();
|
||||||
//map = FindObjectOfType<AbstractMap>();
|
map = transform.parent.Find("Map").GetComponent<AbstractMap>();
|
||||||
mapData = mainController.GetMapData();//获取路书信息
|
mapData = mainController.GetMapData();//获取路书信息
|
||||||
nextlatlong = new Vector2d(mapData.List[0].Point[0], mapData.List[0].Point[1]);//初始化人物位置 TODO加上之前骑行距离
|
nextlatlong = new Vector2d(mapData.List[0].Point[0], mapData.List[0].Point[1]);//初始化人物位置 TODO加上之前骑行距离
|
||||||
cyclingExcutor = mainController.cyclingController;
|
cyclingExcutor = mainController.cyclingController;
|
||||||
|
isStart = mainController.isStart;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void Excute()
|
protected virtual void Excute()
|
||||||
@ -141,11 +144,17 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
{
|
{
|
||||||
ComputeNextSlope();//计算下一个坡度相关数据
|
ComputeNextSlope();//计算下一个坡度相关数据
|
||||||
SendTcp();
|
SendTcp();
|
||||||
if (isStart)
|
if (mainController.isStart)
|
||||||
{
|
{
|
||||||
ticks++;
|
ticks++;
|
||||||
|
//计算累计爬升
|
||||||
|
var diff = mapData.List[CurrentIndex].Elevation - elevation;
|
||||||
|
if (diff > 0)
|
||||||
|
{
|
||||||
|
totalClimb += diff;
|
||||||
|
}
|
||||||
Compute();//接受蓝牙设备数据计算
|
Compute();//接受蓝牙设备数据计算
|
||||||
characterAnimator.SetBool("IsRide", false);//初始化动画状态
|
//characterAnimator.SetBool("IsRide", false);//初始化动画状态
|
||||||
if (totalDistance <= mapData.TotalDistance)
|
if (totalDistance <= mapData.TotalDistance)
|
||||||
{
|
{
|
||||||
//数据处理
|
//数据处理
|
||||||
@ -157,7 +166,7 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
//动画控制
|
//动画控制
|
||||||
if (distance > 0)
|
if (distance > 0)
|
||||||
{
|
{
|
||||||
characterAnimator.SetBool("IsRide", true);//开始移动动画
|
//characterAnimator.SetBool("IsRide", true);//开始移动动画
|
||||||
|
|
||||||
StartCoroutine(MoveTo());//移动
|
StartCoroutine(MoveTo());//移动
|
||||||
//transform.localPosition = nextPos;
|
//transform.localPosition = nextPos;
|
||||||
@ -166,7 +175,7 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
totalDistance = mapData.TotalDistance;
|
totalDistance = mapData.TotalDistance;
|
||||||
characterAnimator.SetBool("ReachEnd", true);//到达终点
|
//characterAnimator.SetBool("ReachEnd", true);//到达终点
|
||||||
//Task.Run(() => { });//异步上传数据
|
//Task.Run(() => { });//异步上传数据
|
||||||
Upload();
|
Upload();
|
||||||
isStart = false;
|
isStart = false;
|
||||||
@ -187,7 +196,7 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
//totalDistance += distance;
|
//totalDistance += distance;
|
||||||
}
|
}
|
||||||
//当前用户调用来上传骑行记录
|
//当前用户调用来上传骑行记录
|
||||||
protected virtual void Upload()
|
public virtual void Upload()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@ -226,12 +235,12 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int CurrentIndex;
|
public int CurrentIndex;
|
||||||
|
private int index;
|
||||||
//当前距离所在的海拔/坡度/距离 下一个点的坡度以及剩余距离
|
//当前距离所在的海拔/坡度/距离 下一个点的坡度以及剩余距离
|
||||||
void ComputeNextSlope()
|
void ComputeNextSlope()
|
||||||
{
|
{
|
||||||
double sumDistance = 0;
|
double sumDistance = 0;
|
||||||
var pointList = mapData.List;
|
var pointList = mapData.List;
|
||||||
int index = 0;
|
|
||||||
for (int i = 0; i < pointList.Count; i++)
|
for (int i = 0; i < pointList.Count; i++)
|
||||||
{
|
{
|
||||||
sumDistance += pointList[i].Distance;
|
sumDistance += pointList[i].Distance;
|
||||||
|
|||||||
@ -17,15 +17,16 @@ public class CyclingController : DeviceServiceMonoBase
|
|||||||
public AbstractMap map;
|
public AbstractMap map;
|
||||||
public GameObject player;
|
public GameObject player;
|
||||||
public GameObject UIObject;
|
public GameObject UIObject;
|
||||||
|
public SelectParamModel selectParamModel;
|
||||||
|
|
||||||
#region 参数
|
#region 参数
|
||||||
private MapDataModel mapData;//当前路书数据
|
private MapDataModel mapData;//当前路书数据
|
||||||
private double[] coordiantes;//当前地图中心
|
private double[] coordiantes;//当前地图中心
|
||||||
private int currentUserId;//当前选中的用户id
|
private int currentUserId;//当前选中的用户id
|
||||||
private bool isStart;//当前游戏是否开始
|
public bool isStart;//当前游戏是否开始
|
||||||
private DateTime startTime;//开始时间
|
private DateTime startTime;//开始时间
|
||||||
private bool initComplete;
|
|
||||||
private CyclingModel cyclingModel;//当前骑行模式
|
public CyclingModel cyclingModel;//当前骑行模式
|
||||||
public BaseCycling cyclingController { get; set; }
|
public BaseCycling cyclingController { get; set; }
|
||||||
private int RouteId;
|
private int RouteId;
|
||||||
private MapApi mapApi;
|
private MapApi mapApi;
|
||||||
@ -34,8 +35,8 @@ public class CyclingController : DeviceServiceMonoBase
|
|||||||
|
|
||||||
void Awake()
|
void Awake()
|
||||||
{
|
{
|
||||||
initComplete = false;
|
|
||||||
cyclingModel = CyclingModel.Single;
|
cyclingModel = CyclingModel.Single;
|
||||||
|
InitParam();
|
||||||
//获取路书信息
|
//获取路书信息
|
||||||
mapApi = new MapApi();
|
mapApi = new MapApi();
|
||||||
RouteId = App.RouteIdParam > 0? App.RouteIdParam : 376;
|
RouteId = App.RouteIdParam > 0? App.RouteIdParam : 376;
|
||||||
@ -61,19 +62,19 @@ public class CyclingController : DeviceServiceMonoBase
|
|||||||
cyclingController = new SingleModel(mapRoute);
|
cyclingController = new SingleModel(mapRoute);
|
||||||
//cyclingModel.OpenCyclingWindow();
|
//cyclingModel.OpenCyclingWindow();
|
||||||
break;
|
break;
|
||||||
//case CyclingModel.Online:
|
//case CyclingModel.Online:
|
||||||
// CyclingModel = new OnlineModel(Route, param);
|
// CyclingModel = new OnlineModel(Route, param);
|
||||||
// //cyclingModel.OpenCyclingWindow();
|
// cyclingModel.OpenCyclingWindow();
|
||||||
// break;
|
// break;
|
||||||
//case CyclingModel.Review:
|
//case CyclingModel.Review:
|
||||||
// if (param.RankingsId.Count == 0)
|
// if (selectParamModel.RankingsId.Count == 0)
|
||||||
// {
|
// {
|
||||||
// UIHelper.ShowError(View.GetLang("MapboxController.PSelectARider"));//请选择骑行人
|
// //TODO:弹窗请选择跟随骑行的人
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
// CyclingModel = new ReviewModel(Route, param);
|
// CyclingModel = new ReviewModel(Route, param);
|
||||||
// //cyclingModel.OpenCyclingWindow();
|
//cyclingModel.OpenCyclingWindow();
|
||||||
// break;
|
// break;
|
||||||
//case Model.CyclingModel.Competition:
|
//case Model.CyclingModel.Competition:
|
||||||
// CyclingModel = new CompetitionModel(Route, param);
|
// CyclingModel = new CompetitionModel(Route, param);
|
||||||
// //cyclingModel.OpenCyclingWindow();
|
// //cyclingModel.OpenCyclingWindow();
|
||||||
@ -90,7 +91,6 @@ public class CyclingController : DeviceServiceMonoBase
|
|||||||
{
|
{
|
||||||
mapData = result;
|
mapData = result;
|
||||||
coordiantes = result.List[0].Point;//TODO计算当前用户所处的位置
|
coordiantes = result.List[0].Point;//TODO计算当前用户所处的位置
|
||||||
initComplete = true;
|
|
||||||
Init();
|
Init();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -98,11 +98,18 @@ public class CyclingController : DeviceServiceMonoBase
|
|||||||
throw new System.Exception("fail to get route data");
|
throw new System.Exception("fail to get route data");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void InitParam()
|
||||||
|
{
|
||||||
|
selectParamModel = new SelectParamModel();
|
||||||
|
selectParamModel.RouteId = App.RouteIdParam;
|
||||||
|
selectParamModel.RankingsId = new List<string>();
|
||||||
|
}
|
||||||
private void Init()
|
private void Init()
|
||||||
{
|
{
|
||||||
//加载人物和地图以及UI界面
|
//加载人物和地图以及UI界面
|
||||||
map.gameObject.SetActive(true);
|
map.gameObject.SetActive(true);
|
||||||
player.SetActive(true);
|
//player.SetActive(true);
|
||||||
UIObject.SetActive(true);
|
UIObject.SetActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -137,14 +137,15 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
var lineRender = _mipMapRoute.AddComponent<LineRenderer>();
|
var lineRender = _mipMapRoute.AddComponent<LineRenderer>();
|
||||||
lineRender.material = new Material(Shader.Find("Sprites/Default"));
|
lineRender.material = new Material(Shader.Find("Sprites/Default"));
|
||||||
var dat = feat.Points[0];
|
var dat = feat.Points[0];
|
||||||
lineRender.endColor = Color.blue;
|
lineRender.endColor = Color.white;
|
||||||
lineRender.startColor = Color.blue;
|
lineRender.startColor = Color.white;
|
||||||
//设置宽度
|
//设置宽度
|
||||||
lineRender.startWidth = 0.6f;
|
lineRender.startWidth = 1f;
|
||||||
lineRender.endWidth = 0.6f;
|
lineRender.endWidth = 1f;
|
||||||
lineRender.positionCount = dat.Count;
|
lineRender.positionCount = dat.Count;
|
||||||
lineRender.SetPositions(feat.Points[0].ToArray());
|
lineRender.SetPositions(feat.Points[0].ToArray());
|
||||||
lineRender.numCornerVertices = 90;
|
lineRender.numCornerVertices = 0;
|
||||||
|
lineRender.loop = false;
|
||||||
_mipMapRoute.layer = 9;
|
_mipMapRoute.layer = 9;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@ -23,12 +23,20 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
_map.OnTileFinished += _map_OnTileFinished;
|
_map.OnTileFinished += _map_OnTileFinished;
|
||||||
_map.OnEditorPreviewEnabled += OnEditorPreviewEnabled;
|
_map.OnEditorPreviewEnabled += OnEditorPreviewEnabled;
|
||||||
_map.OnEditorPreviewDisabled += OnEditorPreviewDisabled;
|
_map.OnEditorPreviewDisabled += OnEditorPreviewDisabled;
|
||||||
|
_map.OnUpdated += _map_OnUpdated;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _map_OnUpdated()
|
||||||
|
{
|
||||||
|
//Debug.Log("_map_OnUpdated");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void _map_OnTileFinished(global::Mapbox.Unity.MeshGeneration.Data.UnityTile obj)
|
private void _map_OnTileFinished(global::Mapbox.Unity.MeshGeneration.Data.UnityTile obj)
|
||||||
{
|
{
|
||||||
transform.gameObject.SetActive(false);
|
transform.gameObject.SetActive(false);
|
||||||
|
Debug.Log("_map_OnTileFinished");
|
||||||
}
|
}
|
||||||
|
|
||||||
void _map_OnInitialized()
|
void _map_OnInitialized()
|
||||||
@ -41,10 +49,9 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
|
|
||||||
if (this == null)
|
if (this == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (s == ModuleState.Finished)
|
if (s == ModuleState.Finished)
|
||||||
{
|
{
|
||||||
transform.gameObject.SetActive(false);
|
//transform.gameObject.SetActive(false);
|
||||||
}
|
}
|
||||||
else if (s == ModuleState.Working)
|
else if (s == ModuleState.Working)
|
||||||
{
|
{
|
||||||
@ -59,12 +66,14 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
|
|
||||||
void OnEditorPreviewEnabled()
|
void OnEditorPreviewEnabled()
|
||||||
{
|
{
|
||||||
transform.gameObject.SetActive(false);
|
//transform.gameObject.SetActive(false);
|
||||||
|
Debug.Log("OnEditorPreviewEnabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnEditorPreviewDisabled()
|
void OnEditorPreviewDisabled()
|
||||||
{
|
{
|
||||||
transform.gameObject.SetActive(true);
|
//transform.gameObject.SetActive(true);
|
||||||
|
Debug.Log("OnEditorPreviewDisabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
32
Assets/Scenes/Ride/Scripts/MiniMapPlayerController.cs
Normal file
32
Assets/Scenes/Ride/Scripts/MiniMapPlayerController.cs
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
using Mapbox.Unity.Map;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Assets.Scenes.Ride.Scripts
|
||||||
|
{
|
||||||
|
public class MiniMapPlayerController: MonoBehaviour
|
||||||
|
{
|
||||||
|
private AbstractPlayer _player;
|
||||||
|
private AbstractMap _map;
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
_map = transform.parent.Find("MiniMap").GetComponent<AbstractMap>();
|
||||||
|
}
|
||||||
|
public void SetController(AbstractPlayer player)
|
||||||
|
{
|
||||||
|
_player = player;
|
||||||
|
}
|
||||||
|
float t = 1f;
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
t -= Time.deltaTime;
|
||||||
|
while (t < 0)
|
||||||
|
{
|
||||||
|
if (_player != null)
|
||||||
|
{
|
||||||
|
transform.localPosition = _map.GeoToWorldPosition(_player.Nextlatlong);
|
||||||
|
}
|
||||||
|
t = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: e19a9a72e39c8da4489a110f68ff2dc1
|
guid: 287bd44099b0d56478ff1fe696796816
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
@ -1,18 +1,13 @@
|
|||||||
using Assets.Scenes.Ride.Scripts.Model;
|
using Assets.Scenes.Ride.Scripts.Model;
|
||||||
using Assets.Scripts;
|
using Assets.Scripts;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Assertions;
|
|
||||||
using UnityEngine.EventSystems;
|
using UnityEngine.EventSystems;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
namespace Assets.Scenes.Ride.Scripts
|
namespace Assets.Scenes.Ride.Scripts
|
||||||
{
|
{
|
||||||
public class NearListFactory : MonoBehaviour
|
public class NearByFactory : MonoBehaviour
|
||||||
{
|
{
|
||||||
PlayerController playerController;
|
PlayerController playerController;
|
||||||
private GameObject nearByItem;
|
private GameObject nearByItem;
|
||||||
@ -33,7 +28,6 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
playerController = FindObjectOfType<PlayerController>();
|
playerController = FindObjectOfType<PlayerController>();
|
||||||
nearByItem = Resources.Load<GameObject>("UI/Prefab/Ride/NearbyItem");
|
nearByItem = Resources.Load<GameObject>("UI/Prefab/Ride/NearbyItem");
|
||||||
nearByMajorItem = Resources.Load<GameObject>("UI/Prefab/Ride/NearbyMajorItem");
|
nearByMajorItem = Resources.Load<GameObject>("UI/Prefab/Ride/NearbyMajorItem");
|
||||||
Assert.IsNotNull(nearByItem);
|
|
||||||
scroll = transform.parent.parent.gameObject;
|
scroll = transform.parent.parent.gameObject;
|
||||||
if (scroll != null)
|
if (scroll != null)
|
||||||
{
|
{
|
||||||
@ -1,21 +1,40 @@
|
|||||||
using System;
|
using Assets.Scenes.Ride.Scripts.Model;
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace Assets.Scenes.Ride.Scripts
|
namespace Assets.Scenes.Ride.Scripts
|
||||||
{
|
{
|
||||||
public class OtherPlayerController : AbstractPlayer
|
public class OtherPlayerController : AbstractPlayer
|
||||||
{
|
{
|
||||||
|
public string[] record;
|
||||||
|
public ReviewItemScript _reviewItemScript;
|
||||||
|
public PlayerController _playerController;
|
||||||
protected override void Init()
|
protected override void Init()
|
||||||
{
|
{
|
||||||
base.Init();
|
base.Init();
|
||||||
SetStart();//自动开始
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Compute()
|
protected override void Compute()
|
||||||
{
|
{
|
||||||
power = 900;//功率
|
if (ticks < record.Length)
|
||||||
speed = Helper.CalculateSpeed(elevation, currentSlope, power, weight, bicycleWeight);
|
{
|
||||||
distance = Math.Round(speed / 3600, 6);
|
var data = TargetData.Read(record[ticks-1]);
|
||||||
totalDistance += distance;
|
distance = data._Speed/3600;
|
||||||
|
totalDistance = data._Distance;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var data = TargetData.Read(record[record.Length - 1]);
|
||||||
|
distance = data._Speed / 3600;
|
||||||
|
totalDistance = data._Distance;
|
||||||
|
}
|
||||||
|
var diff = Math.Round(totalDistance - _playerController.TotalDistance, 3) * 1000;
|
||||||
|
_reviewItemScript.SetDistance(diff);
|
||||||
}
|
}
|
||||||
|
public void SetController(ReviewItemScript reviewItemScript, PlayerController playerController)
|
||||||
|
{
|
||||||
|
_reviewItemScript = reviewItemScript;
|
||||||
|
_playerController = playerController;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -29,14 +29,16 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
heartRate = mainController.UpDateHeart()??0;
|
heartRate = mainController.UpDateHeart()??0;
|
||||||
power = mainController.UpdatePower();
|
power = mainController.UpdatePower();
|
||||||
cadance = mainController.UpdateCadence();
|
cadance = mainController.UpdateCadence();
|
||||||
#if UNITY_EDITOR
|
weight = App.CurrentUser.Weight;
|
||||||
|
bicycleWeight = App.CurrentUser.BicycleWeight;
|
||||||
|
|
||||||
power = 2000;//测试功率
|
power = 2000;//测试功率
|
||||||
#endif
|
|
||||||
speed = Helper.CalculateSpeed(elevation, currentSlope, power, weight, bicycleWeight);
|
speed = Helper.CalculateSpeed(elevation, currentSlope, power, weight, bicycleWeight);
|
||||||
distance = mainController.UpdateDistance(speed);
|
distance = mainController.UpdateDistance(speed);
|
||||||
totalDistance += distance;
|
totalDistance += distance;
|
||||||
//记录骑行数据
|
//记录骑行数据
|
||||||
#if UNITY_EDITOR
|
|
||||||
var recorderData = cyclingExcutor.recorderData;
|
var recorderData = cyclingExcutor.recorderData;
|
||||||
targetData = new TargetData
|
targetData = new TargetData
|
||||||
{
|
{
|
||||||
@ -50,21 +52,21 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
_Lon = nextlatlong.y
|
_Lon = nextlatlong.y
|
||||||
};
|
};
|
||||||
recorderData.RiderDatas.Add(targetData);
|
recorderData.RiderDatas.Add(targetData);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
protected override void SendTcp()
|
protected override void SendTcp()
|
||||||
{
|
{
|
||||||
mainController.cyclingController.Run(null);
|
mainController.cyclingController.Run(null);
|
||||||
}
|
}
|
||||||
//上传数据
|
//上传数据
|
||||||
protected override void Upload()
|
public override void Upload()
|
||||||
{
|
{
|
||||||
#if UNITY_EDITOR
|
|
||||||
string imageFileName = base.CaptureCamera(Camera.main, new Rect(Screen.width * 0f, Screen.height * 0f, Screen.width * 0.5f, Screen.height * 0.5f));
|
string imageFileName = base.CaptureCamera(Camera.main, new Rect(Screen.width * 0f, Screen.height * 0f, Screen.width * 0.5f, Screen.height * 0.5f));
|
||||||
cyclingExcutor.recorderData.IsCompleted = totalDistance == mapData.TotalDistance;
|
cyclingExcutor.recorderData.IsCompleted = totalDistance == mapData.TotalDistance;
|
||||||
cyclingExcutor.recorderData.EndDistance = totalDistance;
|
cyclingExcutor.recorderData.EndDistance = totalDistance;
|
||||||
cyclingExcutor.recorderData.SaveData(cyclingExcutor.Mode,null, imageFileName);
|
cyclingExcutor.recorderData.SaveData(cyclingExcutor.Mode,null, imageFileName);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,42 +0,0 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.Assertions;
|
|
||||||
|
|
||||||
namespace Assets.Scenes.Ride.Scripts
|
|
||||||
{
|
|
||||||
public class NearByItemFactory : MonoBehaviour
|
|
||||||
{
|
|
||||||
private GameObject nearByItem;
|
|
||||||
// Start is called before the first frame update
|
|
||||||
void Start()
|
|
||||||
{
|
|
||||||
nearByItem = Resources.Load<GameObject>("UI/Prefab/Ride/NearbyItem");
|
|
||||||
Assert.IsNotNull(nearByItem);
|
|
||||||
}
|
|
||||||
float t = 1;
|
|
||||||
// Update is called once per frame
|
|
||||||
void Update()
|
|
||||||
{
|
|
||||||
t -= Time.deltaTime;
|
|
||||||
while (t < 0)
|
|
||||||
{
|
|
||||||
//var nearList = MapUDPService.GetNearRiderData(1, 20, new double[] { playerController.Nextlatlong.x, playerController.Nextlatlong.y });
|
|
||||||
//Debug.Log(nearList.Count());
|
|
||||||
GameObject newObj; // Create GameObject instance
|
|
||||||
for (int i = 0; i < 5; i++)
|
|
||||||
{
|
|
||||||
// Create new instances of our prefab until we've created as many as we specified
|
|
||||||
newObj = (GameObject)Instantiate(nearByItem, transform);
|
|
||||||
var nearByItemscript = newObj.GetComponent<NearByItemScript>();
|
|
||||||
nearByItemscript.setName("");
|
|
||||||
nearByItemscript.setRatio("");
|
|
||||||
nearByItemscript.setSpeed("");
|
|
||||||
nearByItemscript.setHead("");
|
|
||||||
t = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,29 +0,0 @@
|
|||||||
using Assets.Scenes.Ride.Scripts.Model;
|
|
||||||
|
|
||||||
public class PubCommData
|
|
||||||
{
|
|
||||||
public static t_user CurrentUser;
|
|
||||||
|
|
||||||
public static int PlanId;//当前训练id
|
|
||||||
|
|
||||||
public static string sp = "";
|
|
||||||
|
|
||||||
public static string po = "";
|
|
||||||
|
|
||||||
public static string SearchKeyword = "";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// lat lng
|
|
||||||
/// </summary>
|
|
||||||
public static double[] location;
|
|
||||||
/// <summary>
|
|
||||||
/// 当前位置
|
|
||||||
/// </summary>
|
|
||||||
public static string Address;
|
|
||||||
|
|
||||||
public static double routeDistance;
|
|
||||||
/// <summary>
|
|
||||||
/// en,zh-CN
|
|
||||||
/// </summary>
|
|
||||||
public static string Lauguage = "";
|
|
||||||
}
|
|
||||||
110
Assets/Scenes/Ride/Scripts/ReviewFactory.cs
Normal file
110
Assets/Scenes/Ride/Scripts/ReviewFactory.cs
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
using Assets.Scenes.Ride.Scripts.Model;
|
||||||
|
using Assets.Scripts.Apis;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
namespace Assets.Scenes.Ride.Scripts
|
||||||
|
{
|
||||||
|
public class ReviewFactory : MonoBehaviour
|
||||||
|
{
|
||||||
|
private CyclingController cyclingController;
|
||||||
|
private GameObject singleArea;
|
||||||
|
private GameObject reviewScrollView;
|
||||||
|
private GameObject reviewItem;
|
||||||
|
private GameObject content;
|
||||||
|
private GameObject otherPlayer;
|
||||||
|
private GameObject miniMapPlayer;
|
||||||
|
|
||||||
|
private MapApi mapApi;
|
||||||
|
private PlayerController playerController;
|
||||||
|
private List<ReviewItemScript> reviewList ;
|
||||||
|
private List<OtherPlayerController> otherList;
|
||||||
|
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
reviewList = new List<ReviewItemScript>();
|
||||||
|
otherList = new List<OtherPlayerController>();
|
||||||
|
cyclingController = FindObjectOfType<CyclingController>();
|
||||||
|
singleArea = transform.Find("SingleArea").gameObject;
|
||||||
|
|
||||||
|
reviewScrollView = transform.Find("ReviewArea").gameObject;
|
||||||
|
content = transform.Find("ReviewArea/ReviewScrollView/Viewport/Content").gameObject;
|
||||||
|
reviewItem = Resources.Load<GameObject>("UI/Prefab/Ride/ReviewItem");
|
||||||
|
otherPlayer = Resources.Load<GameObject>("UI/Prefab/Ride/ReviewPlayer");
|
||||||
|
miniMapPlayer = Resources.Load<GameObject>("UI/Prefab/Ride/MiniMapPlayer");
|
||||||
|
playerController = FindObjectOfType<PlayerController>();
|
||||||
|
mapApi = new MapApi();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
Refresh();
|
||||||
|
}
|
||||||
|
public void Refresh()
|
||||||
|
{
|
||||||
|
var mode = cyclingController.cyclingModel;
|
||||||
|
switch (mode)
|
||||||
|
{
|
||||||
|
case Model.CyclingModel.Single:
|
||||||
|
singleArea.SetActive(true);
|
||||||
|
break;
|
||||||
|
case Model.CyclingModel.Online:
|
||||||
|
break;
|
||||||
|
case Model.CyclingModel.Review:
|
||||||
|
InitReview();
|
||||||
|
break;
|
||||||
|
case Model.CyclingModel.Competition:
|
||||||
|
break;
|
||||||
|
case Model.CyclingModel.GlobalCycling:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
float t = 1;
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
t -= Time.deltaTime;
|
||||||
|
while (t < 0)
|
||||||
|
{
|
||||||
|
ReviewRanking();
|
||||||
|
t = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ReviewRanking()
|
||||||
|
{
|
||||||
|
var sortList = reviewList.OrderByDescending(c => c.GetDistance()).ToList();
|
||||||
|
for (int i = 0; i < sortList.Count; i++)
|
||||||
|
{
|
||||||
|
var item = sortList[i].gameObject.transform;
|
||||||
|
item.SetSiblingIndex(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void InitReview()
|
||||||
|
{
|
||||||
|
reviewScrollView.SetActive(true);
|
||||||
|
var rankingList = mapApi.GetRecordFileFromServer(cyclingController.selectParamModel.RankingsId);
|
||||||
|
foreach (var item in rankingList)
|
||||||
|
{
|
||||||
|
GameObject newObj = (GameObject)Instantiate(reviewItem, content.transform);
|
||||||
|
|
||||||
|
var reviewItemScript = newObj.GetComponent<ReviewItemScript>();
|
||||||
|
reviewItemScript.SetHead(item.WxHeadImg);
|
||||||
|
reviewItemScript.SetName(item.NickName);
|
||||||
|
reviewItemScript.SetDistance(0D);
|
||||||
|
reviewList.Add(reviewItemScript);
|
||||||
|
GameObject otherPlayerObj = (GameObject)Instantiate(otherPlayer, transform.parent.parent.parent);
|
||||||
|
var otherPlayerController = otherPlayerObj.GetComponent<OtherPlayerController>();
|
||||||
|
otherList.Add(otherPlayerController);
|
||||||
|
otherPlayerController.record = item.record;
|
||||||
|
otherPlayerController.SetController(reviewItemScript, playerController);
|
||||||
|
GameObject miniPlayer = (GameObject)Instantiate(miniMapPlayer, transform.parent.parent.parent);
|
||||||
|
var miniController = miniPlayer.GetComponent<MiniMapPlayerController>();
|
||||||
|
miniController.SetController(otherPlayerController);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: cbaab6daec5ce6243ae09ccf27489dae
|
guid: 8a2fc04fdcd84754fa144586013907eb
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
55
Assets/Scenes/Ride/Scripts/ReviewItemScript.cs
Normal file
55
Assets/Scenes/Ride/Scripts/ReviewItemScript.cs
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
using Assets.Scripts;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
namespace Assets.Scenes.Ride.Scripts
|
||||||
|
{
|
||||||
|
public class ReviewItemScript : MonoBehaviour
|
||||||
|
{
|
||||||
|
private RawImage Head;
|
||||||
|
private Text Name;
|
||||||
|
private Text Distance;
|
||||||
|
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
Head = transform.Find("Head").GetComponent<RawImage>();
|
||||||
|
Name = transform.Find("Name").GetComponent<Text>();
|
||||||
|
Distance = transform.Find("Distance").GetComponent<Text>();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
public void SetName(string name)
|
||||||
|
{
|
||||||
|
Name.text = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetHead(string url)
|
||||||
|
{
|
||||||
|
Utils.DisplayImage(StartCoroutine,Head,url);
|
||||||
|
var rect = ((RectTransform)Head.transform).rect;
|
||||||
|
Material material = Instantiate(Resources.Load<Material>("UI/Material/RoundedCornersTextureMaterial"));
|
||||||
|
material.SetVector(Shader.PropertyToID("_WidthHeightRadius"), new Vector4(rect.width, rect.height, rect.height, 0));
|
||||||
|
Head.material = material;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetDistance(double distance)
|
||||||
|
{
|
||||||
|
_distance = distance;
|
||||||
|
var prefix = distance > 0 ? "+" : "";
|
||||||
|
Distance.text = prefix + distance.ToString() + "M";
|
||||||
|
}
|
||||||
|
private double _distance;
|
||||||
|
public double GetDistance()
|
||||||
|
{
|
||||||
|
return _distance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Scenes/Ride/Scripts/ReviewItemScript.cs.meta
Normal file
11
Assets/Scenes/Ride/Scripts/ReviewItemScript.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c0767437c87622348a0b98bbc0c7dc51
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -179,7 +179,7 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
lineRender.endColor = c;
|
lineRender.endColor = c;
|
||||||
lineRender.startColor = c;
|
lineRender.startColor = c;
|
||||||
//设置宽度
|
//设置宽度
|
||||||
lineRender.SetWidth(0.2f, 0.2f);
|
lineRender.SetWidth(0.5f, 0.5f);
|
||||||
lineRender.SetVertexCount(dat.Count);
|
lineRender.SetVertexCount(dat.Count);
|
||||||
lineRender.SetPositions(feat.Points[0].ToArray());
|
lineRender.SetPositions(feat.Points[0].ToArray());
|
||||||
lineRender.loop = false;
|
lineRender.loop = false;
|
||||||
|
|||||||
176
Assets/Scenes/Ride/Scripts/SelectPlayerFactory.cs
Normal file
176
Assets/Scenes/Ride/Scripts/SelectPlayerFactory.cs
Normal file
@ -0,0 +1,176 @@
|
|||||||
|
using Assets.Scenes.Ride.Scripts.Model;
|
||||||
|
using Assets.Scripts;
|
||||||
|
using Assets.Scripts.Apis;
|
||||||
|
using Assets.Scripts.Apis.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.EventSystems;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
namespace Assets.Scenes.Ride.Scripts
|
||||||
|
{
|
||||||
|
public class SelectPlayerFactory : MonoBehaviour
|
||||||
|
{
|
||||||
|
GameObject prefab;
|
||||||
|
GameObject scroll;
|
||||||
|
Transform content;
|
||||||
|
Button rideButton;
|
||||||
|
Button cancelButton;
|
||||||
|
Button closeButton;
|
||||||
|
Button searchButton;
|
||||||
|
GameObject reviewPanel;
|
||||||
|
InputField inputField;
|
||||||
|
private int pageIndex = 0;
|
||||||
|
private int pageSize = 8;
|
||||||
|
private int totalPages = 0;
|
||||||
|
private string seachName = string.Empty;
|
||||||
|
CyclingController cyclingController;
|
||||||
|
public List<GameObject> gameObjects = new List<GameObject>();
|
||||||
|
List<SelectPlayerItemScript> selectPlayerItemScripts = new List<SelectPlayerItemScript>();
|
||||||
|
MapApi mapApi;
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
mapApi = new MapApi();
|
||||||
|
cyclingController = FindObjectOfType<CyclingController>();
|
||||||
|
//分页查询当前路数排行榜选手成绩列表
|
||||||
|
prefab = Resources.Load<GameObject>("UI/Prefab/Ride/SelectPlayerItem");
|
||||||
|
scroll = transform.Find("Panel/PlayerList/Scroll View").gameObject;
|
||||||
|
content = transform.Find("Panel/PlayerList/Scroll View/Viewport/Content");
|
||||||
|
rideButton = transform.Find("Panel/RideButton").GetComponent<Button>();
|
||||||
|
cancelButton = transform.Find("Panel/CancelButton").GetComponent<Button>();
|
||||||
|
closeButton = transform.Find("Panel/Close").GetComponent<Button>();
|
||||||
|
searchButton = transform.Find("Panel/SearchButton").GetComponent<Button>();
|
||||||
|
inputField = transform.Find("Panel/InputField").GetComponent<InputField>();
|
||||||
|
reviewPanel = transform.parent.Find("ReviewPanel").gameObject;
|
||||||
|
|
||||||
|
inputField.onValueChanged.AddListener(InputTextChanged);
|
||||||
|
rideButton.onClick.AddListener(PreStart);
|
||||||
|
cancelButton.onClick.AddListener(Cancel);
|
||||||
|
closeButton.onClick.AddListener(Cancel);
|
||||||
|
searchButton.onClick.AddListener(Search);
|
||||||
|
UIManager.AddEvent(scroll, UnityEngine.EventSystems.EventTriggerType.EndDrag, OnEndDrag);
|
||||||
|
|
||||||
|
gameObjects.Add(transform.Find("Panel/Player1").gameObject);
|
||||||
|
gameObjects.Add(transform.Find("Panel/Player2").gameObject);
|
||||||
|
gameObjects.Add(transform.Find("Panel/Player3").gameObject);
|
||||||
|
gameObjects.Add(transform.Find("Panel/Player4").gameObject);
|
||||||
|
gameObjects.Add(transform.Find("Panel/Player5").gameObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InputTextChanged(string input)
|
||||||
|
{
|
||||||
|
seachName = input;
|
||||||
|
}
|
||||||
|
private void Search()
|
||||||
|
{
|
||||||
|
Utils.DestroyChildren(content);
|
||||||
|
Refresh();
|
||||||
|
}
|
||||||
|
//开始伴侣骑行的面板
|
||||||
|
private void PreStart()
|
||||||
|
{
|
||||||
|
transform.gameObject.SetActive(false);
|
||||||
|
foreach (var item in gameObjects)
|
||||||
|
{
|
||||||
|
var seletedPlayerScript = item.GetComponent<SeletedPlayerScript>();
|
||||||
|
if (seletedPlayerScript.isUsed)
|
||||||
|
{
|
||||||
|
cyclingController.selectParamModel.RankingsId.Add(seletedPlayerScript.GetRankingId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cyclingController.cyclingModel = CyclingModel.Review;
|
||||||
|
if (!reviewPanel.activeSelf)
|
||||||
|
{
|
||||||
|
reviewPanel.SetActive(true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
reviewPanel.GetComponent<ReviewFactory>().Refresh();
|
||||||
|
}
|
||||||
|
reviewPanel.transform.Find("ReviewArea").gameObject.SetActive(true);
|
||||||
|
reviewPanel.transform.Find("SingleArea").gameObject.SetActive(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
//取消和关闭都进入单人骑行界面
|
||||||
|
private void Cancel()
|
||||||
|
{
|
||||||
|
cyclingController.cyclingModel = CyclingModel.Single;
|
||||||
|
transform.gameObject.SetActive(false);
|
||||||
|
reviewPanel.SetActive(true);
|
||||||
|
}
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
Refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Refresh()
|
||||||
|
{
|
||||||
|
|
||||||
|
var list = mapApi.GetRouteRanking(App.RouteIdParam, "1", pageIndex, pageSize, seachName);
|
||||||
|
totalPages = list.data.TotalPages;
|
||||||
|
var parent = transform.Find("Panel/PlayerList/Scroll View/Viewport/Content");
|
||||||
|
foreach (var item in list.data.list)
|
||||||
|
{
|
||||||
|
GameObject newObj = (GameObject)Instantiate(prefab, parent);
|
||||||
|
var selectPlayerItemScript = newObj.GetComponent<SelectPlayerItemScript>();
|
||||||
|
selectPlayerItemScript.SetRankingId(item.Id.ToString());
|
||||||
|
selectPlayerItemScript.SetName(item.NickName);
|
||||||
|
selectPlayerItemScript.SetTimer(item.TotalTime);
|
||||||
|
selectPlayerItemScript.SetHeadImage(item.WxHeadImg);
|
||||||
|
selectPlayerItemScripts.Add(selectPlayerItemScript);
|
||||||
|
UIManager.AddEvent(selectPlayerItemScript.GetButton().gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, OnSelectClick);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void OnSelectClick(BaseEventData baseEventData)
|
||||||
|
{
|
||||||
|
var selectPlayerItemScript = baseEventData.selectedObject.GetComponent<SelectPlayerItemScript>();
|
||||||
|
foreach (var item in gameObjects)
|
||||||
|
{
|
||||||
|
var seletedPlayerScript = item.GetComponent<SeletedPlayerScript>();
|
||||||
|
if (!seletedPlayerScript.isUsed && !selectPlayerItemScript.isSelected)
|
||||||
|
{
|
||||||
|
seletedPlayerScript.SetHead(selectPlayerItemScript.GetImageTexture(), true);
|
||||||
|
seletedPlayerScript.SetName(selectPlayerItemScript.GetName());
|
||||||
|
seletedPlayerScript.SetRankingId(selectPlayerItemScript.GetRankingId());
|
||||||
|
UIManager.AddEvent(seletedPlayerScript.GetButton().gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, OnCloseClick);
|
||||||
|
selectPlayerItemScript.isSelected = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void OnCloseClick(BaseEventData baseEventData)
|
||||||
|
{
|
||||||
|
var seletedPlayerScript = baseEventData.selectedObject.transform.parent.GetComponent<SeletedPlayerScript>();
|
||||||
|
var seletPlayerItemScript = selectPlayerItemScripts.Where(c => c.GetRankingId() == seletedPlayerScript.GetRankingId()).FirstOrDefault();
|
||||||
|
if (seletPlayerItemScript != null)
|
||||||
|
{
|
||||||
|
seletPlayerItemScript.isSelected = false;
|
||||||
|
}
|
||||||
|
seletedPlayerScript.Reset();
|
||||||
|
}
|
||||||
|
private void OnEndDrag(BaseEventData arg0)
|
||||||
|
{
|
||||||
|
var scrollrect = scroll.GetComponent<ScrollRect>();
|
||||||
|
if (scrollrect.verticalNormalizedPosition <= 0)
|
||||||
|
{
|
||||||
|
if (pageIndex < totalPages )
|
||||||
|
{
|
||||||
|
pageIndex++;
|
||||||
|
Refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (scrollrect.verticalNormalizedPosition >= 1)
|
||||||
|
{
|
||||||
|
if (pageIndex >0)
|
||||||
|
{
|
||||||
|
pageIndex--;
|
||||||
|
Refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Scenes/Ride/Scripts/SelectPlayerFactory.cs.meta
Normal file
11
Assets/Scenes/Ride/Scripts/SelectPlayerFactory.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d02ff009326642f4c8b9e7f603c50939
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
65
Assets/Scenes/Ride/Scripts/SelectPlayerItemScript.cs
Normal file
65
Assets/Scenes/Ride/Scripts/SelectPlayerItemScript.cs
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
using Assets.Cyp.Common;
|
||||||
|
using System.Collections;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.Networking;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
namespace Assets.Scenes.Ride.Scripts
|
||||||
|
{
|
||||||
|
public class SelectPlayerItemScript:MonoBehaviour
|
||||||
|
{
|
||||||
|
private string Id ;
|
||||||
|
private RawImage Head;
|
||||||
|
private Text Name;
|
||||||
|
private Text Timer;
|
||||||
|
private Button selectbutton;
|
||||||
|
public bool isSelected;
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
Head = transform.Find("Head").GetComponent<RawImage>();
|
||||||
|
Name = transform.Find("Name").GetComponent<Text>();
|
||||||
|
Timer = transform.Find("Timer").GetComponent<Text>();
|
||||||
|
selectbutton = transform.GetComponent<Button>();
|
||||||
|
}
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
public string GetRankingId()
|
||||||
|
{
|
||||||
|
return Id;
|
||||||
|
}
|
||||||
|
public string GetName()
|
||||||
|
{
|
||||||
|
return Name.text;
|
||||||
|
}
|
||||||
|
public Texture GetImageTexture()
|
||||||
|
{
|
||||||
|
return Head.texture;
|
||||||
|
}
|
||||||
|
public Button GetButton()
|
||||||
|
{
|
||||||
|
return selectbutton;
|
||||||
|
}
|
||||||
|
public void SetRankingId(string id)
|
||||||
|
{
|
||||||
|
Id = id;
|
||||||
|
}
|
||||||
|
public void SetName(string name)
|
||||||
|
{
|
||||||
|
Name.text = name;
|
||||||
|
}
|
||||||
|
public void SetTimer(string timer)
|
||||||
|
{
|
||||||
|
Timer.text = timer;
|
||||||
|
}
|
||||||
|
public void SetHeadImage(string url)
|
||||||
|
{
|
||||||
|
Utils.DisplayImage(StartCoroutine, Head, url);
|
||||||
|
var rect = ((RectTransform)Head.transform).rect;
|
||||||
|
Material material = Instantiate(Resources.Load<Material>("UI/Material/RoundedCornersTextureMaterial"));
|
||||||
|
material.SetVector(Shader.PropertyToID("_WidthHeightRadius"), new Vector4(rect.width, rect.height, rect.height, 0));
|
||||||
|
Head.material = material;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Scenes/Ride/Scripts/SelectPlayerItemScript.cs.meta
Normal file
11
Assets/Scenes/Ride/Scripts/SelectPlayerItemScript.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1a77881c6394b0947b40b398dcdcc7db
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
66
Assets/Scenes/Ride/Scripts/SeletedPlayerScript.cs
Normal file
66
Assets/Scenes/Ride/Scripts/SeletedPlayerScript.cs
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
namespace Assets.Scenes.Ride.Scripts
|
||||||
|
{
|
||||||
|
public class SeletedPlayerScript :MonoBehaviour
|
||||||
|
{
|
||||||
|
private RawImage Head;
|
||||||
|
private Button Close;
|
||||||
|
private Text Name;
|
||||||
|
private string RankingId;
|
||||||
|
public bool isUsed = false;
|
||||||
|
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
Head = transform.GetComponent<RawImage>();
|
||||||
|
Name = transform.Find("Name").GetComponent<Text>();
|
||||||
|
Close = transform.Find("CloseButton").GetComponent<Button>();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
public Button GetButton()
|
||||||
|
{
|
||||||
|
return Close;
|
||||||
|
}
|
||||||
|
public string GetRankingId()
|
||||||
|
{
|
||||||
|
return RankingId;
|
||||||
|
}
|
||||||
|
public void SetName(string name)
|
||||||
|
{
|
||||||
|
Name.text = name;
|
||||||
|
}
|
||||||
|
public void SetRankingId(string id)
|
||||||
|
{
|
||||||
|
RankingId = id;
|
||||||
|
}
|
||||||
|
public void Reset()
|
||||||
|
{
|
||||||
|
Close.gameObject.SetActive(false);
|
||||||
|
isUsed = false;
|
||||||
|
Name.text = "New Shadow";
|
||||||
|
var defaultexture = Resources.Load<Sprite>("Images/New Account").texture;
|
||||||
|
Head.texture = defaultexture;
|
||||||
|
RankingId = string.Empty;
|
||||||
|
}
|
||||||
|
public void SetHead(Texture texture, bool select)
|
||||||
|
{
|
||||||
|
Close.gameObject.SetActive(select);
|
||||||
|
isUsed = select;
|
||||||
|
Head.texture = texture;
|
||||||
|
var rect = ((RectTransform)Head.transform).rect;
|
||||||
|
Material material = Instantiate(Resources.Load<Material>("UI/Material/RoundedCornersTextureMaterial"));
|
||||||
|
material.SetVector(Shader.PropertyToID("_WidthHeightRadius"), new Vector4(rect.width, rect.height, rect.height, 0));
|
||||||
|
Head.material = material;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Scenes/Ride/Scripts/SeletedPlayerScript.cs.meta
Normal file
11
Assets/Scenes/Ride/Scripts/SeletedPlayerScript.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e5d999af905983b4b9b61199c4ece030
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -11,6 +11,7 @@ using Assets.Scenes.Ride.Scripts.Model;
|
|||||||
using UnityEngine.SceneManagement;
|
using UnityEngine.SceneManagement;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Assets.Cyp.Common;
|
using Assets.Cyp.Common;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Assets.Scenes.Ride.Scripts
|
namespace Assets.Scenes.Ride.Scripts
|
||||||
{
|
{
|
||||||
@ -18,50 +19,50 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
public class SingleUIManager : MonoBehaviour
|
public class SingleUIManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
#region UI control
|
#region UI control
|
||||||
Text Fps;//fps
|
GameObject target;
|
||||||
Button startBtn;//开始按钮
|
GameObject rightPanel;//右边列表
|
||||||
Button simpleBtn;//进入简约模式按钮
|
GameObject leftPanel;//左边列表
|
||||||
|
GameObject nextSlopePanel;//下一个坡度面板
|
||||||
|
GameObject currentSlopePanel;//当前坡度面板
|
||||||
|
GameObject selectPanel;//骑行模式选择
|
||||||
|
GameObject selectPlayer;//伴侣骑行选择窗口
|
||||||
|
GameObject reviewPanel;
|
||||||
|
GameObject titlePanel;
|
||||||
|
GameObject quitPanel;//退出界面
|
||||||
|
|
||||||
|
Text nextSlopeText;//下一个坡度
|
||||||
|
Text nextSlopeDistanceText;//下一个坡度距离
|
||||||
|
Text currentSlopeText;//当前坡度
|
||||||
|
Text currentSlopeDistanceText;//当前坡度已骑行距离
|
||||||
|
Text currentSlopeToatalDistanceText;//当前坡度总距离
|
||||||
|
Text speedTxt;//当前速度
|
||||||
|
Text powerTxt;//功率
|
||||||
|
Text timerTxt;//计时器
|
||||||
Text ditance;//当前骑行距离
|
Text ditance;//当前骑行距离
|
||||||
Text totalDistance;//当前骑行距离
|
Text totalDistance;//当前骑行距离
|
||||||
Text candance;//踏频
|
Text candance;//踏频
|
||||||
Text heartRate;//心率
|
Text heartRate;//心率
|
||||||
GameObject rightPanel;//右边列表
|
|
||||||
GameObject leftPanel;//左边列表
|
|
||||||
|
|
||||||
GameObject nextSlopePanel;//下一个坡度面板
|
|
||||||
|
|
||||||
GameObject currentSlopePanel;//当前坡度面板
|
|
||||||
[SerializeField]
|
|
||||||
Text nextSlopeText;//下一个坡度
|
|
||||||
[SerializeField]
|
|
||||||
Text nextSlopeDistanceText;//下一个坡度距离
|
|
||||||
[SerializeField]
|
|
||||||
Text currentSlopeText;//当前坡度
|
|
||||||
[SerializeField]
|
|
||||||
Text currentSlopeDistanceText;//当前坡度距离
|
|
||||||
[SerializeField]
|
|
||||||
Text speedTxt;//当前速度
|
|
||||||
[SerializeField]
|
|
||||||
Text powerTxt;//功率
|
|
||||||
[SerializeField]
|
|
||||||
Text timerTxt;//计时器
|
|
||||||
[SerializeField]
|
|
||||||
Text countDownTxt;//倒计时5s
|
Text countDownTxt;//倒计时5s
|
||||||
[SerializeField]
|
|
||||||
Text mapName;//路书名称
|
Text mapName;//路书名称
|
||||||
[SerializeField] LineChart elevationChart;//海拔图
|
Text fps;//fps
|
||||||
[SerializeField] RawImage img;//当前用户头像
|
Text totalClimb;
|
||||||
[SerializeField]
|
|
||||||
Button StartOrPauseButton;//暂停按钮
|
Button startBtn;//开始按钮
|
||||||
[SerializeField]
|
Button simpleBtn;//进入简约模式按钮
|
||||||
Button SettingButton;//设置那妞
|
Button pauseButton;//暂停按钮
|
||||||
[SerializeField]
|
Button settingButton;//设置那妞
|
||||||
Button DeviceButton;//设备按钮
|
Button deviceButton;//设备按钮
|
||||||
[SerializeField]
|
Button exitButton;//退出按钮
|
||||||
Button ExitButton;//退出按钮
|
Button singleButton;//单人骑行按钮
|
||||||
|
Button shadowButton;//影子选手按钮
|
||||||
|
Button addButton;//添加伴侣骑行
|
||||||
|
Button saveButton;//退出panel保存按钮
|
||||||
|
Button cancelQuitButton;//退出panel取消按钮
|
||||||
|
Button closeQuitButton;//退出panel关闭按钮
|
||||||
|
|
||||||
|
LineChart elevationChart;//海拔图
|
||||||
|
RawImage img;//海拔图头像
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
GameObject target;//开始按钮
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 控制器
|
#region 控制器
|
||||||
@ -76,26 +77,65 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
|
|
||||||
void Awake()
|
void Awake()
|
||||||
{
|
{
|
||||||
Fps = transform.Find("Panel/FPS").GetComponent<Text>();
|
#region 控件获取与事件绑定
|
||||||
|
fps = transform.Find("Panel/FPS").GetComponent<Text>();
|
||||||
leftPanel = transform.Find("Panel/ReviewPanel").gameObject;
|
leftPanel = transform.Find("Panel/ReviewPanel").gameObject;
|
||||||
rightPanel = transform.Find("Panel/NearPanel").gameObject;
|
rightPanel = transform.Find("Panel/NearPanel").gameObject;
|
||||||
startBtn = transform.Find("Panel/StartButton").GetComponent<Button>();
|
startBtn = transform.Find("Panel/StartButton").GetComponent<Button>();
|
||||||
simpleBtn = transform.Find("Panel/SimpleButton").GetComponent<Button>();
|
simpleBtn = transform.Find("Panel/SimpleButton").GetComponent<Button>();
|
||||||
ditance = transform.Find("Panel/CyclingComputerPanel/Distance").GetComponent<Text>();
|
ditance = transform.Find("Panel/CyclingComputerPanel/Distance").GetComponent<Text>();
|
||||||
totalDistance = transform.Find("Panel/TotalDistancePanel/TotalDistance").GetComponent<Text>();
|
titlePanel = transform.Find("Panel/TitlePanel").gameObject;
|
||||||
|
totalDistance = transform.Find("Panel/TitlePanel/TotalDistance").GetComponent<Text>();
|
||||||
candance = transform.Find("Panel/PowerPanel/Cadance").GetComponent<Text>();
|
candance = transform.Find("Panel/PowerPanel/Cadance").GetComponent<Text>();
|
||||||
heartRate = transform.Find("Panel/PowerPanel/Hrv").GetComponent<Text>();
|
heartRate = transform.Find("Panel/PowerPanel/Hrv").GetComponent<Text>();
|
||||||
nextSlopePanel = transform.Find("Panel/NextSlopePanel").gameObject;
|
nextSlopePanel = transform.Find("Panel/NextSlopePanel").gameObject;
|
||||||
currentSlopePanel = transform.Find("Panel/CurrentSlopePanel").gameObject;
|
currentSlopePanel = transform.Find("Panel/CurrentSlopePanel").gameObject;
|
||||||
|
nextSlopeText = transform.Find("Panel/NextSlopePanel/NextSlopeText").GetComponent<Text>();
|
||||||
|
nextSlopeDistanceText = transform.Find("Panel/NextSlopePanel/NextSlopeDistance").GetComponent<Text>();
|
||||||
|
currentSlopeText = transform.Find("Panel/CurrentSlopePanel/CurrentSlopeText").GetComponent<Text>();
|
||||||
|
currentSlopeDistanceText = transform.Find("Panel/CurrentSlopePanel/CurrentSlopeDistance").GetComponent<Text>();
|
||||||
|
currentSlopeToatalDistanceText = transform.Find("Panel/CurrentSlopePanel/TotalSlopeDistance").GetComponent<Text>();
|
||||||
|
speedTxt = transform.Find("Panel/CyclingComputerPanel/Speed").GetComponent<Text>();
|
||||||
|
powerTxt = transform.Find("Panel/PowerPanel/Power").GetComponent<Text>();
|
||||||
|
timerTxt = transform.Find("Panel/CyclingComputerPanel/Timer").GetComponent<Text>();
|
||||||
|
countDownTxt = transform.Find("Panel/CountDown").GetComponent<Text>();
|
||||||
|
mapName = transform.Find("Panel/TitlePanel/MapName").GetComponent<Text>();
|
||||||
|
totalClimb = transform.Find("Panel/CyclingComputerPanel/TotalClimb").GetComponent<Text>();
|
||||||
|
elevationChart = transform.Find("Panel/ElevationChart").GetComponent<LineChart>();
|
||||||
|
img = transform.Find("Panel/ElevationChart/HeadImage").GetComponent<RawImage>();
|
||||||
|
selectPanel = transform.Find("Panel/SelectPanel").gameObject;
|
||||||
|
selectPlayer = transform.Find("Panel/SelectPlayer").gameObject;
|
||||||
|
reviewPanel = transform.Find("Panel/ReviewPanel").gameObject;
|
||||||
|
quitPanel = transform.Find("Panel/QuitPanel").gameObject;
|
||||||
|
|
||||||
|
pauseButton = transform.Find("Panel/ToolBarPanel/StartOrPauseButton").GetComponent<Button>();
|
||||||
|
settingButton = transform.Find("Panel/ToolBarPanel/SettingButton").GetComponent<Button>();
|
||||||
|
deviceButton = transform.Find("Panel/ToolBarPanel/DeviceButton").GetComponent<Button>();
|
||||||
|
exitButton = transform.Find("Panel/ToolBarPanel/ExitButton").GetComponent<Button>();
|
||||||
|
singleButton = transform.Find("Panel/SelectPanel/SingleButton").GetComponent<Button>();
|
||||||
|
shadowButton = transform.Find("Panel/SelectPanel/ShadowButton").GetComponent<Button>();
|
||||||
|
addButton = transform.Find("Panel/ReviewPanel/SingleArea/AddButton").GetComponent<Button>();
|
||||||
|
saveButton = transform.Find("Panel/QuitPanel/SaveButton").GetComponent<Button>();
|
||||||
|
cancelQuitButton = transform.Find("Panel/QuitPanel/CancelButton").GetComponent<Button>();
|
||||||
|
closeQuitButton = transform.Find("Panel/QuitPanel/CloseButton").GetComponent<Button>();
|
||||||
|
|
||||||
|
target = transform.parent.Find("Target").gameObject;
|
||||||
|
|
||||||
startBtn.onClick.AddListener(StartRide);
|
startBtn.onClick.AddListener(StartRide);
|
||||||
simpleBtn.onClick.AddListener(ClearPanel);
|
simpleBtn.onClick.AddListener(ClearPanel);
|
||||||
StartOrPauseButton.onClick.AddListener(PauseRide);
|
pauseButton.onClick.AddListener(PauseRide);
|
||||||
SettingButton.onClick.AddListener(ShowSettingPanel);
|
settingButton.onClick.AddListener(ShowSettingPanel);
|
||||||
DeviceButton.onClick.AddListener(ShowDevicePanel);
|
deviceButton.onClick.AddListener(ShowDevicePanel);
|
||||||
ExitButton.onClick.AddListener(StopRide);
|
exitButton.onClick.AddListener(StopRide);
|
||||||
|
singleButton.onClick.AddListener(SingleRide);
|
||||||
|
shadowButton.onClick.AddListener(ShadowRide);
|
||||||
|
addButton.onClick.AddListener(ShowSelectPlayer);
|
||||||
|
saveButton.onClick.AddListener(SaveRide);
|
||||||
|
cancelQuitButton.onClick.AddListener(CancelQuit);
|
||||||
|
closeQuitButton.onClick.AddListener(CloseQuit);
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
playerController = FindObjectOfType<PlayerController>();
|
playerController = FindObjectOfType<PlayerController>();
|
||||||
@ -112,7 +152,7 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
{
|
{
|
||||||
tt -= Time.deltaTime;
|
tt -= Time.deltaTime;
|
||||||
while (tt < 0) {
|
while (tt < 0) {
|
||||||
Fps.text = (1 / Time.deltaTime).ToString();
|
fps.text = (1 / Time.deltaTime).ToString();
|
||||||
tt = 1;
|
tt = 1;
|
||||||
}
|
}
|
||||||
//获取当前选中玩家绑定当前UI
|
//获取当前选中玩家绑定当前UI
|
||||||
@ -146,6 +186,7 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
nextSlopeDistanceText.text ="-" + Math.Round(playerController.NextSlopeDistance, 0).ToString()+"M";
|
nextSlopeDistanceText.text ="-" + Math.Round(playerController.NextSlopeDistance, 0).ToString()+"M";
|
||||||
currentSlopeText.text = Math.Round(playerController.CurrentSlope, 1).ToString() + "%";
|
currentSlopeText.text = Math.Round(playerController.CurrentSlope, 1).ToString() + "%";
|
||||||
currentSlopeDistanceText.text = Math.Round(playerController.CurrentSlopeDistance, 0).ToString() + "M";
|
currentSlopeDistanceText.text = Math.Round(playerController.CurrentSlopeDistance, 0).ToString() + "M";
|
||||||
|
totalClimb.text = Math.Round(playerController.TotalClimb, 0).ToString();
|
||||||
//移动海拔图头像 TODO:移动所有人的头像
|
//移动海拔图头像 TODO:移动所有人的头像
|
||||||
UpdateRealTimeChart();
|
UpdateRealTimeChart();
|
||||||
//MoveChartMarkPoint();
|
//MoveChartMarkPoint();
|
||||||
@ -157,10 +198,28 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
if (target != null)
|
if (target != null)
|
||||||
{
|
{
|
||||||
target.transform.position = playerController.transform.position; //new Vector3((float)Math.Round(player.transform.position.x,1), 0, (float)Math.Round(player.transform.position.z,1));
|
target.transform.position = playerController.transform.position; //new Vector3((float)Math.Round(player.transform.position.x,1), 0, (float)Math.Round(player.transform.position.z,1));
|
||||||
target.transform.rotation = new Quaternion(playerController.transform.rotation.x, playerController.transform.rotation.y + 180, playerController.transform.rotation.z, playerController.transform.rotation.w);
|
//target.transform.rotation = playerController.transform.rotation;//new Quaternion(playerController.transform.rotation.x, playerController.transform.rotation.y +1f, playerController.transform.rotation.z, playerController.transform.rotation.w);
|
||||||
|
target.transform.eulerAngles = new Vector3(0, playerController.transform.eulerAngles.y + 180f, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private void SingleRide()
|
||||||
|
{
|
||||||
|
selectPanel.SetActive(false);
|
||||||
|
mainController.cyclingModel = CyclingModel.Single;
|
||||||
|
//显示单人骑行列表
|
||||||
|
reviewPanel.SetActive(true);
|
||||||
|
}
|
||||||
|
private void ShadowRide()
|
||||||
|
{
|
||||||
|
mainController.cyclingModel = CyclingModel.Review;
|
||||||
|
selectPanel.SetActive(false);
|
||||||
|
//显示影子选手骑行列表
|
||||||
|
selectPlayer.SetActive(true);
|
||||||
|
}
|
||||||
|
private void ShowSelectPlayer()
|
||||||
|
{
|
||||||
|
selectPlayer.SetActive(true);
|
||||||
|
}
|
||||||
private void StartRide()
|
private void StartRide()
|
||||||
{
|
{
|
||||||
//加个5秒钟倒计时
|
//加个5秒钟倒计时
|
||||||
@ -175,30 +234,52 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
playerController.SetPause();
|
playerController.SetPause();
|
||||||
startBtn.gameObject.SetActive(true);
|
startBtn.gameObject.SetActive(true);
|
||||||
}
|
}
|
||||||
|
private void SaveRide()
|
||||||
|
{
|
||||||
|
playerController.Upload();
|
||||||
|
//SceneManager.LoadScene("MainScene");
|
||||||
|
quitPanel.SetActive(false);
|
||||||
|
}
|
||||||
|
private void CancelQuit()
|
||||||
|
{
|
||||||
|
quitPanel.SetActive(false);
|
||||||
|
SceneManager.LoadScene("MainScene");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CloseQuit()
|
||||||
|
{
|
||||||
|
quitPanel.SetActive(false);
|
||||||
|
}
|
||||||
//结束游戏
|
//结束游戏
|
||||||
private void StopRide()
|
private void StopRide()
|
||||||
{
|
{
|
||||||
//TODO:主动保存或者舍弃保存
|
quitPanel.SetActive(true);
|
||||||
//切换到路数列表
|
|
||||||
SceneManager.LoadScene("MainScene");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//显示设备连接
|
//显示设备连接
|
||||||
private void ShowDevicePanel()
|
private void ShowDevicePanel()
|
||||||
{
|
{
|
||||||
UIManager.Show(UIManager.Instance.DevicePanel, transform.Find("Panel").gameObject);
|
UIManager.ShowCustom(UIManager.Instance.DevicePanel, transform.Find("Panel").gameObject);
|
||||||
}
|
}
|
||||||
//显示设置
|
//显示设置
|
||||||
private void ShowSettingPanel()
|
private void ShowSettingPanel()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
int isSimple = 1;
|
int isSimple = 1;
|
||||||
//TODO:简约模式
|
|
||||||
private void ClearPanel()
|
private bool clearLock = true;
|
||||||
|
private void ClearPanel()
|
||||||
{
|
{
|
||||||
leftPanel.transform.DOLocalMove(new Vector3(leftPanel.transform.localPosition.x + isSimple * -430f, leftPanel.transform.localPosition.y, leftPanel.transform.localPosition.z), 1);
|
if (clearLock)
|
||||||
rightPanel.transform.DOLocalMove(new Vector3(rightPanel.transform.localPosition.x + isSimple * 330f, rightPanel.transform.localPosition.y, rightPanel.transform.localPosition.z), 1);
|
{
|
||||||
isSimple *= -1;
|
clearLock = false;
|
||||||
|
leftPanel.transform.DOLocalMove(new Vector3(leftPanel.transform.localPosition.x + isSimple * -430f, leftPanel.transform.localPosition.y, leftPanel.transform.localPosition.z), 1);
|
||||||
|
titlePanel.transform.DOLocalMove(new Vector3(titlePanel.transform.localPosition.x, titlePanel.transform.localPosition.y + isSimple * 180f, titlePanel.transform.localPosition.z), 1);
|
||||||
|
rightPanel.transform.DOLocalMove(new Vector3(rightPanel.transform.localPosition.x + isSimple * 330f, rightPanel.transform.localPosition.y, rightPanel.transform.localPosition.z), 1).onComplete += () =>
|
||||||
|
{
|
||||||
|
clearLock = true;
|
||||||
|
isSimple *= -1;
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private int maxCacheDataNumber = 100;//海拔图最大点数
|
private int maxCacheDataNumber = 100;//海拔图最大点数
|
||||||
@ -265,7 +346,9 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
}
|
}
|
||||||
void AddOneData(int index)
|
void AddOneData(int index)
|
||||||
{
|
{
|
||||||
|
string category = index.ToString();
|
||||||
elevationChart.AddData(0, elevationList[index]);
|
elevationChart.AddData(0, elevationList[index]);
|
||||||
|
//elevationChart.AddXAxisData(category);
|
||||||
//elevationChart.AddXAxisData(index.ToString(), index);
|
//elevationChart.AddXAxisData(index.ToString(), index);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -87,5 +87,11 @@ namespace Assets.Scripts.Apis
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public JsonResult<MapRouteRankingList> GetRouteRanking(int id,string type, int pageIndex,int pageSize,string name)
|
||||||
|
{
|
||||||
|
var url = $"Map/v1/GetRouteRanking?pageIndex={ pageIndex }&pageSize={ pageSize }&name={ name }&id={ id }&type={ type }&filterSelf={ true }";
|
||||||
|
|
||||||
|
return Get<JsonResult<MapRouteRankingList>>(url);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
85
Assets/Scripts/Apis/Models/MapRouteRanking.cs
Normal file
85
Assets/Scripts/Apis/Models/MapRouteRanking.cs
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Assets.Scripts.Apis.Models
|
||||||
|
{
|
||||||
|
public class MapRouteRanking
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public int Id { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public string WxHeadImg { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public string TotalTime { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public int UserId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public int RouteId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 晴天
|
||||||
|
/// </summary>
|
||||||
|
public string NickName { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public double? AveragePower { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public double? AverageHeartRate { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public string ContinueMark { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public double WeightKg { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public int? AntModelId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public string DeviceName { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 骑行台
|
||||||
|
/// </summary>
|
||||||
|
public string DeviceType { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public int RowNumber { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public bool MySelf { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public double TripDistance { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public bool IsDNF { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public double Progress { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Scripts/Apis/Models/MapRouteRanking.cs.meta
Normal file
11
Assets/Scripts/Apis/Models/MapRouteRanking.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f577b928fb29d2a40a05b1c82e391c9a
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
14
Assets/Scripts/Apis/Models/MapRouteRankingList.cs
Normal file
14
Assets/Scripts/Apis/Models/MapRouteRankingList.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Assets.Scripts.Apis.Models
|
||||||
|
{
|
||||||
|
public class MapRouteRankingList
|
||||||
|
{
|
||||||
|
public List<MapRouteRanking> list { get; set; }
|
||||||
|
public int TotalPages { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/Scripts/Apis/Models/MapRouteRankingList.cs.meta
Normal file
11
Assets/Scripts/Apis/Models/MapRouteRankingList.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 44c26ae622e95fd4a86dc6f543aaa711
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -1,4 +1,5 @@
|
|||||||
using Assets.Scripts.Apis.Models;
|
using Assets.Scenes.Ride.Scripts.Model;
|
||||||
|
using Assets.Scripts.Apis.Models;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
@ -14,4 +15,5 @@ public static class App
|
|||||||
public static string WxAppId = "wx9e8ca734e024f084";
|
public static string WxAppId = "wx9e8ca734e024f084";
|
||||||
public static string WxAppSecret = "906abafb2a18bc7a66ccfa5550f859b6";
|
public static string WxAppSecret = "906abafb2a18bc7a66ccfa5550f859b6";
|
||||||
public static IDictionary<string,Texture> TextureCache = new Dictionary<string, Texture>();
|
public static IDictionary<string,Texture> TextureCache = new Dictionary<string, Texture>();
|
||||||
|
public static SelectParamModel selectParam;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -198,6 +198,51 @@ public class UIManager : MonoBehaviour
|
|||||||
panelToShow.transform.localScale = parent.transform.localScale;
|
panelToShow.transform.localScale = parent.transform.localScale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void ShowCustom(PFUIPanel panelToShow, GameObject parent = null, bool modal = false)
|
||||||
|
{
|
||||||
|
if (UIManager.Instance == null || panelToShow == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (modal)
|
||||||
|
{
|
||||||
|
parent = UIManager.Instance.ModalsPanel.gameObject;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (prePanel != null)
|
||||||
|
{
|
||||||
|
prePanel.Close();
|
||||||
|
}
|
||||||
|
prePanel = panelToShow;
|
||||||
|
}
|
||||||
|
foreach (Transform child in parent.transform)
|
||||||
|
{
|
||||||
|
//GameObject.Destroy(child);
|
||||||
|
//GameObject.Destroy(child.gameObject);
|
||||||
|
child.gameObject.SetActive(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
//var panel = UIManager.Instance.MainPanel; //UIManager.Instance.MainCanvasTransform.transform.Find("Panel");
|
||||||
|
|
||||||
|
//panel.gameObject.AddComponent<GameObject>(panelToShow.gameObject);
|
||||||
|
//panelToShow.transform.SetParent(parent.transform);
|
||||||
|
panelToShow.transform.parent = parent.transform;
|
||||||
|
//panelToShow.gameObject.SetActive(true);
|
||||||
|
panelToShow.Show();
|
||||||
|
//panelToShow.transform.position = new Vector3(0, 0, 0);
|
||||||
|
panelToShow.transform.localPosition = new Vector3(0, 0, 0);
|
||||||
|
//panelToShow.transform.localRotation = new Quaternion(0, 0, 0, 0);
|
||||||
|
|
||||||
|
//if (modal == false)
|
||||||
|
{
|
||||||
|
panelToShow.transform.GetComponent<RectTransform>().offsetMin = new Vector2(0, 0);
|
||||||
|
panelToShow.transform.GetComponent<RectTransform>().offsetMax = new Vector2(0, 0);
|
||||||
|
}
|
||||||
|
panelToShow.transform.localScale = parent.transform.localScale;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//public static void ShowHomePanel()
|
//public static void ShowHomePanel()
|
||||||
//{
|
//{
|
||||||
@ -213,10 +258,6 @@ public class UIManager : MonoBehaviour
|
|||||||
{
|
{
|
||||||
UIManager.Show(UIManager.Instance.HomePanel, UIManager.Instance.MainPanel);
|
UIManager.Show(UIManager.Instance.HomePanel, UIManager.Instance.MainPanel);
|
||||||
}
|
}
|
||||||
public static void ShowCyclingController()
|
|
||||||
{
|
|
||||||
UIManager.Show(UIManager.Instance.CyclingController, UIManager.Instance.MainPanel);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void ShowDevicePanel()
|
public static void ShowDevicePanel()
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user