本地合并备份

This commit is contained in:
lishuo 2021-04-27 15:15:51 +08:00
parent 2b275d6dc5
commit 4353a38c96
44 changed files with 5568 additions and 4294 deletions

View File

@ -81,7 +81,7 @@ Material:
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 0.2784314, b: 0.5137255, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _ColorFrom: {r: 1, g: 1, b: 1, a: 1}
- _ColorTo: {r: 1, g: 1, b: 1, a: 1}
- _Combine: {r: 1, g: 1, b: 1, a: 0}

View File

@ -74,4 +74,4 @@ Material:
- _ZWrite: 1
m_Colors:
- _Color: {r: 0.9764706, g: 0.1882353, b: 0.5254902, a: 0.6509804}
- _EmissionColor: {r: 0.00024361434, g: 0.00029474328, b: 0.00019549299, a: 1}
- _EmissionColor: {r: 0.9473069, g: 0.029556843, b: 0.23839766, a: 1}

View File

@ -73,5 +73,5 @@ Material:
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0.7764706, g: 0.8235294, b: 0.88235295, a: 1}
- _EmissionColor: {r: 0.0354168, g: 0.034315474, b: 0.043327622, a: 1}
- _Color: {r: 0.15294118, g: 0.8745098, b: 0.8901961, a: 1}
- _EmissionColor: {r: 0.020288562, g: 0.7379107, b: 0.7681514, a: 1}

View File

@ -0,0 +1,88 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: lineStyle10
m_Shader: {fileID: 4800000, guid: 818b0e872599e3948b6cceff71a30540, type: 3}
m_ShaderKeywords: _EMISSION
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: 9959c8d64e68c9b49a96dd9de08c4315, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Angle: 90
- _BumpScale: 1
- _ChartTiling: 1
- _ColorMask: 15
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 0}
- _ColorFrom: {r: 1, g: 1, b: 1, a: 1}
- _ColorTo: {r: 1, g: 1, b: 1, a: 1}
- _Combine: {r: 1, g: 1, b: 1, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e7e0c22ac407dc941a27e972d28cf665
timeCreated: 1514055023
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,88 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: lineStyle11
m_Shader: {fileID: 4800000, guid: 0a799adfcb28a1847873696ef5d3c504, type: 3}
m_ShaderKeywords: _EMISSION
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: 9959c8d64e68c9b49a96dd9de08c4315, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Angle: 90
- _BumpScale: 1
- _ChartTiling: 1
- _ColorMask: 15
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0.003921569, g: 1, b: 0.48235294, a: 1}
- _ColorFrom: {r: 1, g: 1, b: 1, a: 1}
- _ColorTo: {r: 1, g: 1, b: 1, a: 1}
- _Combine: {r: 1, g: 1, b: 1, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 32baf5afdd5348a40bf00201df6efefe
timeCreated: 1555444995
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,88 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: lineStyle12
m_Shader: {fileID: 4800000, guid: 818b0e872599e3948b6cceff71a30540, type: 3}
m_ShaderKeywords: _EMISSION
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: 9959c8d64e68c9b49a96dd9de08c4315, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Angle: 180
- _BumpScale: 1
- _ChartTiling: 1
- _ColorMask: 15
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 0}
- _ColorFrom: {r: 0.40101328, g: 0.33304498, b: 0.8088235, a: 1}
- _ColorTo: {r: 0.6039216, g: 0.5882353, b: 0.7137255, a: 1}
- _Combine: {r: 1, g: 1, b: 1, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 383f2e04dadd5784ba0a1feb4fa0e4e0
timeCreated: 1555445153
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,88 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: lineStyle3
m_Shader: {fileID: 4800000, guid: 818b0e872599e3948b6cceff71a30540, type: 3}
m_ShaderKeywords: _EMISSION
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Angle: 90
- _BumpScale: 1
- _ChartTiling: 1
- _ColorMask: 15
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 0}
- _ColorFrom: {r: 0, g: 0.28235295, b: 0.47058824, a: 1}
- _ColorTo: {r: 0, g: 0.75172424, b: 1, a: 1}
- _Combine: {r: 1, g: 1, b: 1, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: db35be7d6a96f3a4db0ff82c7fa5dcd2
timeCreated: 1484495774
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,88 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: lineStyle4
m_Shader: {fileID: 4800000, guid: 818b0e872599e3948b6cceff71a30540, type: 3}
m_ShaderKeywords: _EMISSION
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Angle: 90
- _BumpScale: 1
- _ChartTiling: 1
- _ColorMask: 15
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 0}
- _ColorFrom: {r: 1, g: 0.7607843, b: 0.05882353, a: 1}
- _ColorTo: {r: 0.7372549, g: 0.5254902, b: 0.047058824, a: 1}
- _Combine: {r: 1, g: 1, b: 1, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 91aed68e71b82f845b308bc7e52a5fc6
timeCreated: 1484495806
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,88 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: lineStyle5
m_Shader: {fileID: 4800000, guid: 818b0e872599e3948b6cceff71a30540, type: 3}
m_ShaderKeywords: _EMISSION
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Angle: 90
- _BumpScale: 1
- _ChartTiling: 1
- _ColorMask: 15
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 0}
- _ColorFrom: {r: 1, g: 1, b: 1, a: 0}
- _ColorTo: {r: 1, g: 1, b: 1, a: 0}
- _Combine: {r: 1, g: 1, b: 1, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 461075cd7b55d3a44a167184cf0f9276
timeCreated: 1484496738
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,88 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: lineStyle6
m_Shader: {fileID: 4800000, guid: 818b0e872599e3948b6cceff71a30540, type: 3}
m_ShaderKeywords: _EMISSION
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: 9959c8d64e68c9b49a96dd9de08c4315, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Angle: 90
- _BumpScale: 1
- _ChartTiling: 1
- _ColorMask: 15
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 0}
- _ColorFrom: {r: 1, g: 1, b: 1, a: 1}
- _ColorTo: {r: 1, g: 1, b: 1, a: 1}
- _Combine: {r: 1, g: 1, b: 1, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 668bd8183c0da874c9917694ebb5ecbf
timeCreated: 1484496872
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,88 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: lineStyle7
m_Shader: {fileID: 4800000, guid: 818b0e872599e3948b6cceff71a30540, type: 3}
m_ShaderKeywords: _EMISSION
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: 9959c8d64e68c9b49a96dd9de08c4315, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Angle: 90
- _BumpScale: 1
- _ChartTiling: 1
- _ColorMask: 15
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 0}
- _ColorFrom: {r: 0, g: 0, b: 0, a: 1}
- _ColorTo: {r: 0, g: 0, b: 0, a: 1}
- _Combine: {r: 1, g: 1, b: 1, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 29dbe58e44f6a3641b86269af5af1460
timeCreated: 1490639253
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,88 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: lineStyle8
m_Shader: {fileID: 4800000, guid: 0a799adfcb28a1847873696ef5d3c504, type: 3}
m_ShaderKeywords: _EMISSION
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: 9959c8d64e68c9b49a96dd9de08c4315, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Angle: 90
- _BumpScale: 1
- _ChartTiling: 1
- _ColorMask: 15
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 0}
- _ColorFrom: {r: 1, g: 1, b: 1, a: 0}
- _ColorTo: {r: 1, g: 1, b: 1, a: 0}
- _Combine: {r: 1, g: 1, b: 1, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f8a6693957c0b2a4b8ec1d4d606e000c
timeCreated: 1491818899
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,88 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: lineStyle9
m_Shader: {fileID: 4800000, guid: 818b0e872599e3948b6cceff71a30540, type: 3}
m_ShaderKeywords: _EMISSION
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Angle: 90
- _BumpScale: 1
- _ChartTiling: 1
- _ColorMask: 15
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 0}
- _ColorFrom: {r: 0.78965515, g: 0.78965515, b: 0.78965515, a: 1}
- _ColorTo: {r: 1, g: 1, b: 1, a: 1}
- _Combine: {r: 1, g: 1, b: 1, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7f6a79249c948af4aab659f47a52ccc2
timeCreated: 1513870105
licenseType: Store
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,87 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2705753492350533462
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2705753492350533461}
- component: {fileID: 2705753492350533458}
- component: {fileID: 2705753492350533459}
- component: {fileID: 2705753492350533460}
m_Layer: 5
m_Name: Head
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2705753492350533461
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2705753492350533462}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 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: 28, y: 28}
m_Pivot: {x: 0, y: 0}
--- !u!222 &2705753492350533458
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2705753492350533462}
m_CullTransparentMesh: 0
--- !u!114 &2705753492350533459
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2705753492350533462}
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: 0.36078432, g: 0.489, b: 0.43137255, a: 0.7254902}
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!114 &2705753492350533460
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2705753492350533462}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: adb30198aa32dd140b5750692dd48104, type: 3}
m_Name:
m_EditorClassIdentifier:
radius: 14

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 8f1e274f52c8cc6449da88cfa35831c1
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -30,7 +30,7 @@ Transform:
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: 15, y: 15, z: 15}
m_LocalScale: {x: 30, y: 25, z: 22}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
@ -61,7 +61,7 @@ MeshRenderer:
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 82096aab38f01cb40a1cbf8629a810ba, type: 2}
- {fileID: 2100000, guid: 9c84f71e98b0047259dedc9428260078, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0

View File

@ -29,7 +29,7 @@ Transform:
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: 1, y: 1, z: 1}
m_LocalScale: {x: 1.5, y: 1.5, z: 1.5}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0

View File

@ -206,7 +206,7 @@ MonoBehaviour:
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_HighlightedColor: {r: 1, g: 0.45490196, b: 0.52156866, 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}

File diff suppressed because it is too large Load Diff

View File

@ -192,6 +192,7 @@ namespace Assets.Scenes.Ride.Scripts
public int CurrentIndex;
private int index;
public double CurrentDistance;//当前所处区间距离
public double NextSlopeTotalDistance;
//当前距离所在的海拔/坡度/距离 下一个点的坡度以及剩余距离
void ComputeNextSlope()
{
@ -209,21 +210,22 @@ namespace Assets.Scenes.Ride.Scripts
break;
}
}
preIndex = index > 0 ? index - 1:0;
//计算当前海拔和坡度
elevation = pointList[index].Elevation;
currentSlope = pointList[index].Grade;
//计算下一个点的坡度和距离
int nextIndex = index == pointList.Count - 1 ? index : index + 1;
CurrentIndex = nextIndex;
preIndex = index > 0 ? index - 1:0;//前一个索引
CurrentIndex = index;//当前索引
int nextIndex = index == pointList.Count - 1 ? index : index + 1; //计算下一个点的坡度和距离
PreElevation = pointList[preIndex].Elevation; //计算上一个海拔
PreSlope = pointList[preIndex].Grade; //计算上一个坡度
//计算当前海拔和坡度&当前区间距离
elevation = pointList[CurrentIndex].Elevation;
currentSlope = pointList[CurrentIndex].Grade;
CurrentDistance = pointList[CurrentIndex].Distance;
//计算下一个海拔和坡度&当前区间距离
nextSlope = pointList[nextIndex].Grade;
nextSlopeDistance = sumDistance - totalDistance * 1000;
NextSlopeTotalDistance = pointList[nextIndex].Distance;
currentSlopeDistance = totalDistance * 1000 - (sumDistance - pointList[index].Distance);
//计算当前区间距离
CurrentDistance = pointList[CurrentIndex].Distance;
//计算上一个坡度
PreElevation = pointList[preIndex].Elevation;
PreSlope = pointList[preIndex].Grade;
}
public double PreElevation;
public double PreSlope;

View File

@ -12,7 +12,8 @@ namespace Assets.Scenes.Ride.Scripts
public class ChartDataSourceScript:MonoBehaviour, IComparer<DoubleVector2>
{
public string Category = "Player 2";
public int DownSampleToPoints = 200;
public int DownSampleToPoints = 0;
public int targetPoints = 500;
public List<DoubleVector2> mData = new List<DoubleVector2>(); // the data held by the chart
double pageSize = 2f;
double currentPagePosition = 0.0;
@ -24,15 +25,24 @@ namespace Assets.Scenes.Ride.Scripts
{
graph = GetComponent<GraphChartBase>();
}
public bool isEnd(int index)
public double GetRealTimeStart()
{
return index - start == 51;
return graph.HorizontalScrolling / mData.Count();
}
public bool isMid(int index)
public double GetRealTimeEnd()
{
return index - start == 26;
return (graph.HorizontalScrolling+ graph.DataSource.HorizontalViewSize) / mData.Count();
}
public bool ReachEnd()
{
return graph.HorizontalScrolling + graph.DataSource.HorizontalViewSize >= mData.Count;
}
public bool ReachMid(int index)
{
return index - graph.HorizontalScrolling >= graph.DataSource.HorizontalViewSize / 2;
}
bool VerifySorted(List<DoubleVector2> data)
{
@ -67,6 +77,8 @@ namespace Assets.Scenes.Ride.Scripts
double sampleCount = ((double)total) / (double)DownSampleToPoints;
// graph.DataSource.AddPointToCategory(Category, mData[start].x, mData[start].y);
pointMap.Clear();
for (int i = 0; i < DownSampleToPoints; i++)
{
int fractionStart = start + (int)(i * sampleCount); // the first point with a fraction
@ -74,16 +86,19 @@ namespace Assets.Scenes.Ride.Scripts
fractionEnd = Math.Min(fractionEnd, mData.Count - 1);
double x = 0, y = 0;
double divide = 0.0;
List<int> l = new List<int>();
for (int j = fractionStart; j < fractionEnd; j++) // avarge the poins
{
x += mData[j].x;
y += mData[j].y;
l.Add(j);
divide++;
}
if (divide > 0.0)
{
x /= divide;
y /= divide;
pointMap.Add(l, i);
graph.DataSource.AddPointToCategory("Player 2", x, y);
}
else
@ -91,8 +106,21 @@ namespace Assets.Scenes.Ride.Scripts
}
// graph.DataSource.AddPointToCategory(Category, mData[last].x, mData[last].y);
}
public int GetViewIndex(int index)
{
foreach (var item in pointMap)
{
if (item.Key.Contains(index))
{
return item.Value;
}
}
return index;
}
int FindClosestIndex(double position) // if you want to know what is index is currently displayed . use binary search to find it
private IDictionary<IList<int>, int> pointMap = new Dictionary<IList<int>, int>();
public int FindClosestIndex(double position) // if you want to know what is index is currently displayed . use binary search to find it
{
//NOTE :: this method assumes your data is sorted !!!
int res = mData.BinarySearch(new DoubleVector2(position, 0.0), this);
@ -130,7 +158,7 @@ namespace Assets.Scenes.Ride.Scripts
}
public int start, end;
void LoadPage(double pagePosition)
public void LoadPage(double pagePosition)
{
if (graph != null)
{
@ -141,7 +169,9 @@ namespace Assets.Scenes.Ride.Scripts
findPointsForPage(pagePosition, out start, out end); // get the page edges
graph.DataSource.ClearCategory("Player 2"); // clear the cateogry
graph.DataSource.HorizontalViewSize = targetPoints > mData.Count ? mData.Count : targetPoints;
if (DownSampleToPoints <= 0)
LoadWithoutDownSampling(start, end);
else

View File

@ -200,11 +200,20 @@ public class CyclingController : DeviceServiceMonoBase
map.Terrain.SetElevationType(ElevationLayerType.FlatTerrain);
map.ImageLayer.SetLayerSource(ImagerySourceType.MapboxDark);
player.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f);
var trailRenderer = player.GetComponent<TrailRenderer>();
trailRenderer.time = 0;
StartCoroutine(EnableTrailRenderer(trailRenderer));
Is3dView = false;
arrowGameObj.SetActive(true);
}
}
IEnumerator EnableTrailRenderer(TrailRenderer trailRenderer)
{
yield return new WaitForSeconds(1f);
trailRenderer.time = 10;
}
#endregion
#region
@ -264,6 +273,7 @@ public class CyclingController : DeviceServiceMonoBase
public void Save(double totalDistance)
{
isQuit = true;
isStart = false;
string imageFileName = CaptureCamera(Camera.main, new Rect(Screen.width * 0f, Screen.height * 0f, Screen.width * 0.5f, Screen.height * 0.5f));
cyclingController.recorderData.StartTime = startTime;

View File

@ -12,20 +12,6 @@ namespace Assets.Scenes.Ride.Scripts
{
public class InitMiniMapProvider : MonoBehaviour
{
[SerializeField]
GameObject cude1;
[SerializeField]
GameObject cude2;
[SerializeField]
GameObject cude3;
[SerializeField]
GameObject cude4;
[SerializeField]
GameObject center;
[SerializeField]
AbstractMap _map;
[SerializeField]
@ -60,7 +46,10 @@ namespace Assets.Scenes.Ride.Scripts
{
if (playerController != null)
{
var tr=transform.parent.Find("SingleUI/Panel/Image");
_player.transform.localPosition = _map.GeoToWorldPosition(playerController.Currentlatlong);
((RectTransform)tr.transform).position = _minicamera.WorldToScreenPoint(_player.transform.localPosition);
//((RectTransform)tr).localPosition = _minicamera.WorldToViewportPoint(_player.transform.localPosition);
}
}
private bool init = false;
@ -163,11 +152,11 @@ namespace Assets.Scenes.Ride.Scripts
lineRender.endColor = Color.white;
lineRender.startColor = Color.white;
//设置宽度
lineRender.startWidth = 5f;
lineRender.endWidth = 5f;
lineRender.startWidth = 8f;
lineRender.endWidth = 8f;
lineRender.positionCount = dat.Count;
lineRender.SetPositions(feat.Points[0].ToArray());
lineRender.numCornerVertices = 60;
lineRender.numCornerVertices = 30;
lineRender.loop = false;
_mipMapRoute.layer = 9;
}

View File

@ -78,7 +78,9 @@ namespace Assets.Scenes.Ride.Scripts
else
{
Utils.DisplayImageAysnc(StartCoroutine, mapRouteImage, url, dowloadCallBack);
this.AddProcess(10);
}
}
private void dowloadCallBack(string url)
@ -93,25 +95,7 @@ namespace Assets.Scenes.Ride.Scripts
}
var canvasGroup = mapRouteImage.GetComponent<CanvasGroup>();
canvasGroup.DOFade(1, 1);
this.AddProcess(10);
}
float t = 1f;
IEnumerator doCanvasGroup(CanvasGroup cp)
{
t -= Time.deltaTime;
while (t<0)
{
if (1 != cp.alpha)
{
cp.alpha = Mathf.Lerp(cp.alpha, 1, alphaSpeed * Time.deltaTime);
if (Mathf.Abs(1 - cp.alpha) <= 0.01f)
{
cp.alpha = 1;
}
yield return null;
}
t = 1;
}
}
//设定当前loading进度
public void AddProcess(float v)

View File

@ -0,0 +1,36 @@
using DG.Tweening;
using System;
using System.Linq;
using UnityEngine;
using UnityEngine.UI;
namespace Assets.Scenes.Ride.Scripts
{
public class NumberDotween:MonoBehaviour
{
private Sequence mScoreSequence;
private Text text;
private float mOldScore = 0;
private void Start()
{
//函数内初始化
mScoreSequence = DOTween.Sequence();
//函数内设置属性
mScoreSequence.SetAutoKill(false);
text = transform.GetComponent<Text>();
}
public void AnimateNum(float newScore, int digit, string format)
{
mScoreSequence.Append(DOTween.To(delegate (float value)
{
var temp = Math.Round(value, digit);
//向Text组件赋值
text.text = string.Format(format, temp);
}, mOldScore, newScore, 0.4f));
//将更新后的值记录下来, 用于下一次滚动动画
mOldScore = newScore;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: cc35dd113658adb47867d8c21c22fb4a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,6 +1,9 @@
using Assets.Scenes.Ride.Scripts.Model;
using Assets.Scripts;
using DG.Tweening;
using System;
using UnityEngine;
using UnityEngine.UI;
namespace Assets.Scenes.Ride.Scripts
{
@ -9,6 +12,7 @@ namespace Assets.Scenes.Ride.Scripts
public string[] record;
public ReviewItemScript _reviewItemScript;
public PlayerController _playerController;
RawImage head;
public int tickOffset = 0;
protected override void Init()
@ -39,6 +43,18 @@ namespace Assets.Scenes.Ride.Scripts
{
_reviewItemScript = reviewItemScript;
}
public void MoveHead(Transform parent,Vector3 nextPosition)
{
if (head == null)
{
head = Instantiate(Resources.Load<RawImage>("UI/Prefab/Ride/Head"));
head.texture = _reviewItemScript.GetHead();
head.transform.parent = parent;
head.transform.localScale = new Vector3(0.8f, 0.8f, 0.8f);
}
head.transform.DOMove(new Vector3(nextPosition.x, nextPosition.y, 0), 1);
}
}
}

View File

@ -32,9 +32,8 @@ namespace Assets.Scenes.Ride.Scripts
cadance = mainController.UpdateCadence();
weight = App.CurrentUser.Weight;
bicycleWeight = App.CurrentUser.BicycleWeight;
//#if UNITY_EDITOR
power = 20000;//测试功率
//#if UNITY_EDITOR
power = 1000;//测试功率
//#endif
mainController.TrackResistance(currentSlope);//TODO
speed = Helper.CalculateSpeed(elevation, currentSlope, power, weight, bicycleWeight);

View File

@ -31,6 +31,11 @@ namespace Assets.Scenes.Ride.Scripts
Name.text = name;
}
public Texture GetHead()
{
return Head.texture;
}
public void SetHead(string url)
{
Utils.DisplayImage(StartCoroutine,Head,url);

View File

@ -106,7 +106,7 @@ namespace Assets.Scenes.Ride.Scripts
{
var point = mapData.List[i].Point;
Vector3 item = _map.GeoToWorldPosition(new Vector2d(point[0], point[1]));
item.y += 0.3f;
item.y += 1f;
//if (!posInScreen(item) && i > playerController.CurrentIndex)
//{
// break;
@ -116,7 +116,7 @@ namespace Assets.Scenes.Ride.Scripts
// dat.Add(item);
//}
//前后取50个点
decimal diff = i - playerController.CurrentIndex;
decimal diff = i - playerController.CurrentIndex+1;
decimal diffAbs = Math.Abs(diff);
if (diffAbs <= 200)
{
@ -124,7 +124,7 @@ namespace Assets.Scenes.Ride.Scripts
}
if (diff < 0 && diff > -200)
{
item.y += 0.30001f;
item.y += 0.15f;
path.Add(item);
}
}
@ -202,12 +202,12 @@ namespace Assets.Scenes.Ride.Scripts
lineRender.endWidth = 1f;
lineRender.positionCount = dat.Count;
lineRender.SetPositions(feat.Points[0].ToArray());
lineRender.loop = false;
lineRender.numCapVertices = 90;
lineRender.numCornerVertices = 90;
lineRender.loop = false;
//lineRender.numCapVertices = 10;
lineRender.numCornerVertices = 10;
}
}
void CreatPathRoute(List<Vector3> feat)
{
@ -219,7 +219,7 @@ namespace Assets.Scenes.Ride.Scripts
_pathRoute.transform.parent = transform;
var lineRender = _pathRoute.AddComponent<LineRenderer>();
lineRender.material = new Material(Shader.Find("Sprites/Default"));
//lineRender.material = Resources.Load<Material>("UI/Material/lineStyle9");
lineRender.endColor = new Color(0.9764706f, 0.1882353f, 0.5254902f, 0.65f);
lineRender.startColor = new Color(0.9764706f, 0.1882353f, 0.5254902f, 0.65f);
@ -228,10 +228,16 @@ namespace Assets.Scenes.Ride.Scripts
lineRender.endWidth = 1f;
lineRender.positionCount = feat.Count;
lineRender.SetPositions(feat.ToArray());
lineRender.loop = false;
lineRender.numCapVertices = 90;
lineRender.numCornerVertices = 90;
//lineRender.loop = false;
lineRender.numCapVertices = 10;
lineRender.numCornerVertices = 10;
//
lineRender.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off;
lineRender.allowOcclusionWhenDynamic = false;
lineRender.textureMode = LineTextureMode.Tile;
lineRender.motionVectorGenerationMode = MotionVectorGenerationMode.ForceNoMotion;
lineRender.receiveShadows = false;
lineRender.rayTracingMode = UnityEngine.Experimental.Rendering.RayTracingMode.Off;
}
}
}

View File

@ -71,7 +71,7 @@ namespace Assets.Scenes.Ride.Scripts
inputField.onValueChanged.AddListener(InputTextChanged);
startValue.onValueChanged.AddListener(StartvalueChanged);
endValue.onValueChanged.AddListener(StartvalueChanged);
endValue.onValueChanged.AddListener(EndvalueChanged);
UIManager.AddEvent(rideButton.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, PreStart);
UIManager.AddEvent(cancelButton.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, Cancel);

View File

@ -67,6 +67,8 @@ namespace Assets.Scenes.Ride.Scripts
RawImage img;//海拔图头像
RawImage miniMap;//小地图
RawImage altitudeGraph;//海拔图
Image leftImage;
Image rightImage;
#endregion
#region
@ -143,6 +145,8 @@ namespace Assets.Scenes.Ride.Scripts
closeQuitButton = transform.Find("Panel/QuitPanel/CloseButton").GetComponent<Button>();
viewButton =transform.Find("Panel/ViewButton").GetComponent<Button>();
altitudeGraph = transform.Find("Panel/TitlePanel/AltitudeGraph").GetComponent<RawImage>();
leftImage = transform.Find("Panel/TitlePanel/Left").GetComponent<Image>();
rightImage = transform.Find("Panel/TitlePanel/Right").GetComponent<Image>();
preSlopeText = transform.Find("Panel/PreSlopePanel/PreSlopeText").GetComponent<Text>();
@ -165,7 +169,8 @@ namespace Assets.Scenes.Ride.Scripts
UIManager.AddEvent(shadowButton.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerEnter, OnPointEnter);
UIManager.AddEvent(singleButton.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerExit, OnPointExit);
UIManager.AddEvent(shadowButton.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerExit, OnPointExit);
#endregion
}
@ -193,16 +198,49 @@ namespace Assets.Scenes.Ride.Scripts
}
}
void Start()
{
Init();
RenderChart();
ContinueRide();//继续骑行
}
// Update is called once per frame
float time = 1f;
void Update()
{
time -= Time.deltaTime;
while (time < 0) {
MoveChartMarkPoint();
BindDataSource();
fps.text = (1 / Time.deltaTime).ToString();
time = 1;
}
CountDown();
MoveCamera();
}
private void Init()
{
playerController = FindObjectOfType<PlayerController>();
mainController = FindObjectOfType<CyclingController>();
var route = mainController.GetRoute();
mapName.text = route.RouteInstance.Name;
totalDistance.text = Math.Round(mainController.GetMapData().TotalDistance, 1).ToString() + "KM";//总里程
Utils.DisplayImage(StartCoroutine, altitudeGraph, route.RouteInstance.AltitudeGraph);//渲染海拔图
RenderChart();
startIndex = playerController.CurrentIndex;
//继续骑行如果有伴侣就自动进入伴侣骑行
if (mainController.mapRouteRankingList == null || mainController.mapRouteRankingList.Count == 0)
{
shadowButton.enabled = false;
shadowButton.interactable = false;
}
else
{
shadowButton.enabled = true;
shadowButton.interactable = true;
}
}
//继续骑行如果有伴侣就自动进入伴侣骑行
private void ContinueRide()
{
if (mainController.routeResult != null)
{
if (mainController.routeResult.Mode == CyclingModel.Review.ToString())
@ -221,61 +259,15 @@ namespace Assets.Scenes.Ride.Scripts
nearByPanel.SetActive(true);
}
}
// Update is called once per frame
float tt = 1f;
void Update()
//移动摄像头和箭头位置
private void MoveCamera()
{
tt -= Time.deltaTime;
while (tt < 0) {
fps.text = (1 / Time.deltaTime).ToString();
MoveChartMarkPoint();
tt = 1;
}
//获取当前选中玩家绑定当前UI
if (playerController != null)
{
//绑定UI
speedTxt.text = $"{Math.Round(playerController.Speed,1)}";
powerTxt.text = $"{playerController.Power}";
timerTxt.text = Helper.FormatTicks(playerController.TotalTicks);
ditance.text = Math.Round(playerController.TotalDistance, 1).ToString("f1");
heartRate.text = $"{Math.Round(playerController.HeartRate, 0)}";
candance.text = $"{Math.Round(playerController.Cadance, 0)}";
preSlopeText.text = $"{Math.Round(playerController.PreSlope, 1)}%";
//倒计时
if (count > 0)
{
timeRemaining -= Time.deltaTime;
if (timeRemaining <= 0)//定时器
{
count--;
if (count == 0)
{
mainController.SetStart();
countDownTxt.gameObject.SetActive(false);
}
timeRemaining = 1.0f;
}
}
countDownTxt.text = count.ToString();
//坡度相关数据
nextSlopeText.text = Math.Round(playerController.NextSlope, 1).ToString() + "%";
nextSlopeDistanceText.text ="-" + Math.Round(playerController.NextSlopeDistance, 0).ToString()+"M";
currentSlopeText.text = Math.Round(playerController.CurrentSlope, 1).ToString() + "%";
currentSlopeDistanceText.text = Math.Round(playerController.CurrentSlopeDistance, 0).ToString() + "M";
totalClimb.text = Math.Round(playerController.TotalClimb, 0).ToString();
//动态显示当前人物移动动画
//移动海拔图头像 TODO移动所有人的头像
//MoveChartMarkPoint();
}
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));
if (!mainController.Is3dView)
{ //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 + 155f, 0);
target.transform.eulerAngles = new Vector3(0, playerController.transform.eulerAngles.y + 160f, 0);
}
else
{
@ -293,7 +285,48 @@ namespace Assets.Scenes.Ride.Scripts
}
}
}
//倒计时
private void CountDown()
{
if (count > 0)
{
timeRemaining -= Time.deltaTime;
if (timeRemaining <= 0)//定时器
{
count--;
if (count == 0)
{
mainController.SetStart();
countDownTxt.gameObject.SetActive(false);
}
timeRemaining = 1.0f;
}
}
countDownTxt.text = count.ToString();
}
private void BindDataSource()
{
//获取当前选中玩家绑定当前UI
if (playerController != null)
{
speedTxt.text = $"{Math.Round(playerController.Speed, 1)}";
powerTxt.text = $"{playerController.Power}";
timerTxt.text = Helper.FormatTicks(playerController.TotalTicks);
ditance.text = Math.Round(playerController.TotalDistance, 1).ToString("f1");
heartRate.text = $"{Math.Round(playerController.HeartRate, 0)}";
candance.text = $"{Math.Round(playerController.Cadance, 0)}";
preSlopeText.text = $"{Math.Round(playerController.PreSlope, 1)}%";
currentSlopeToatalDistanceText.text = $"Total:{Math.Round(playerController.CurrentDistance, 0)}M";
//坡度相关数据
nextSlopeText.text = Math.Round(playerController.NextSlope, 1).ToString() + "%";
//nextSlopeDistanceText.GetComponent<NumberDotween>().AnimateNum((float)playerController.NextSlopeDistance, 0, "-{0}M");
nextSlopeDistanceText.text = $"{Math.Round(playerController.NextSlopeTotalDistance, 0)}M";
currentSlopeText.text = Math.Round(playerController.CurrentSlope, 1).ToString() + "%";
currentSlopeDistanceText.GetComponent<NumberDotween>().AnimateNum((float)playerController.CurrentSlopeDistance, 0, "{0}M");
totalClimb.text = Math.Round(playerController.TotalClimb, 0).ToString();
}
}
private void SingleRide(BaseEventData baseEventData)
{
selectPanel.SetActive(false);
@ -369,7 +402,6 @@ namespace Assets.Scenes.Ride.Scripts
{
quitPanel.SetActive(false);
}
//切换到3d视角
private void ChangeView(BaseEventData baseEventData)
{
@ -397,15 +429,14 @@ namespace Assets.Scenes.Ride.Scripts
{
}
int isSimple = 1;
private bool clearLock = true;
private void ClearPanel(BaseEventData baseEventData)
private void ClearPanel(BaseEventData baseEventData)
{
if (clearLock)
{
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);
titlePanel.transform.DOLocalMove(new Vector3(titlePanel.transform.localPosition.x, titlePanel.transform.localPosition.y + isSimple * 200f, titlePanel.transform.localPosition.z), 1);
miniMap.transform.DOLocalMove(new Vector3(miniMap.transform.localPosition.x , miniMap.transform.localPosition.y + isSimple * 260f, miniMap.transform.localPosition.z), 1);
nearByPanel.transform.DOLocalMove(new Vector3(nearByPanel.transform.localPosition.x + isSimple * 330f, nearByPanel.transform.localPosition.y, nearByPanel.transform.localPosition.z), 1).onComplete += () =>
{
@ -417,42 +448,11 @@ namespace Assets.Scenes.Ride.Scripts
}
}
private int maxCacheDataNumber = 100;//海拔图最大点数
private int totalCount;//路线实际点数
private int startIndex;//选中玩家起始索引
private int interval = 50;//选中玩家移动索引个数
private float[] elevationList;
GraphChartBase graph;
ChartDataSourceScript chartDataSourceScript;
//初始化海拔图
void RenderChart()
{
//elevationChart.ClearData();
//elevationList = mainController.GetLineChartData();
//totalCount = elevationList.Length;
//maxCacheDataNumber = Math.Min(totalCount, maxCacheDataNumber);
//elevationChart.SetMaxCache(maxCacheDataNumber);
////for (int i = 0; i < maxCacheDataNumber; i++)
////{
//// elevationChart.AddData(0, elevationList[i]);
////}
////elevationChart.RefreshChart();
//ElevationToScreenPoint();
//var endIndex = playerController.CurrentIndex;
//var s = endIndex / maxCacheDataNumber;
//var v = endIndex % maxCacheDataNumber;
//maxCacheDataNumber = Math.Min(totalCount-s* maxCacheDataNumber, maxCacheDataNumber);
//for (int i = 0; i < maxCacheDataNumber; i++)
//{
// initCount++;
// if (initCount > maxCacheDataNumber) break;
// AddOneData(s * maxCacheDataNumber + v + i);
//}
//elevationChart.RefreshChart();
var mapData = mainController.GetMapData();
double x = 0;
Dictionary<double, double> dataSource = new Dictionary<double, double>();
@ -467,151 +467,99 @@ namespace Assets.Scenes.Ride.Scripts
}
dd.Add(item.Elevation);
}
var sc = transform.Find("Panel/GraphChart").GetComponent<ChartDataSourceScript>();
chartDataSourceScript = transform.Find("Panel/GraphChart").GetComponent<ChartDataSourceScript>();
graph = transform.Find("Panel/GraphChart").GetComponent<GraphChartBase>();
sc.SetDataSource(dd.ToArray());
chartDataSourceScript.SetDataSource(dd.ToArray());
////初始化头像坐标
//var n = graph.DataSource.GetPoint("Player 2", 0);
//graph.PointToWorldSpace(out Vector3 nextPosition, n.x, n.y, "Player 2");
//img.transform.DOMove(new Vector3(nextPosition.x, nextPosition.y, 0), 1);
if (App.CurrentUser != null)
{
Utils.DisplayImage(StartCoroutine, img, App.CurrentUser.WxHeadImg);
}
}
//长路线动态更新chart
private int initCount;
private float updateTime;
private int lastIndex;
private int chartAddNum;
void UpdateRealTimeChart()
{
var endIndex = playerController.CurrentIndex;
updateTime += Time.deltaTime;
if (updateTime >= 1)
{
int delta = endIndex - lastIndex;
if (delta >0 && initCount < totalCount)
{
lastIndex = endIndex;
AddOneData(initCount);
initCount++;
updateTime = 0;
chartAddNum++;
}
var v = (endIndex - chartAddNum) % maxCacheDataNumber;
//MoveChartMarkPoint(v);
App.CurrentUserHeadTexture = img.texture;
}
}
void AddOneData(int index)
{
string category = index.ToString();
elevationChart.AddData(0, elevationList[index]);
//elevationChart.AddXAxisData(category);
//elevationChart.AddXAxisData(index.ToString(), index);
}
private Dictionary<int, Vector2> pointMap = new Dictionary<int, Vector2>();
void ElevationToScreenPoint()
{
var xUnit =(float) Math.Round(854f * (Screen.width/1600f) / elevationList.Length);//x单位
var maxelev = (float)elevationList.Max();
var yUnit =(float)Math.Round(46f * (Screen.height / 900f) / maxelev);//y单位
var xoffset = 373f * (Screen.width / 1600f);
var yoffset = 175f * (Screen.height / 900f);
for (int i = 0; i < elevationList.Length; i++)
{
var c = new Vector2(i*xUnit+ xoffset, elevationList[i]*yUnit + yoffset);
pointMap.Add(i, c);
}
}
public GameObject testButton;
//挪到人物脚本中处理
void MoveChartMarkPoint()
{
Vector3 prePosition = img.transform.position;
int nextIndex = playerController.CurrentIndex;
double ditance = playerController.Distance;//当前移动距离
double currentDistance = playerController.CurrentDistance;//当前区间距离
var t = currentDistance != 0 ? ditance*1000 / currentDistance : 1;
var n = graph.DataSource.GetPoint("Player 2", nextIndex);
graph.PointToWorldSpace(out Vector3 nextPosition, n.x, n.y, "Player 2");
//var currentPos = Vector3.Lerp(prePosition, nextPosition, (float)t);
if (mainController.isStart)
//if (mainController.isStart)
{
var ss = graph.GetComponentInChildren<ChartDataSourceScript>();
if (ss.total <= ss.DownSampleToPoints)
{
img.transform.DOMove(new Vector3(nextPosition.x, nextPosition.y, 0), 0);
}
else
{ //人 - 线(中点) - 人ss.total - graph.HorizontalScrolling <100
//人物移动到中间的时候,线开始向左边平滑移动
var mapData = mainController.GetMapData();
//线移动
var interval = ditance / mapData.TotalDistance * ss.total;
//线到头了开始移动人物
var s = (ss.total - graph.HorizontalScrolling);
img.transform.DOMove(new Vector3(nextPosition.x, nextPosition.y, 0), 1);
//if (s < 200)
//{
//}
//else
//{
// graph.HorizontalScrolling = nextIndex + 1 - t;
// img.transform.DOMove(new Vector3(prePosition.x, currentPos.y, 0), 1);
//}
}
MoverCurrentUserHead();
MoveOtherHeads();
MoveElevationImage();
}
//else
//{
// //人移动 当前中间的时候开始切换线移动
// img.transform.DOMove(new Vector3(currentPos.x, currentPos.y, 0), 0);
// //线快加载五年的时候
//}
}
//移动当前用户头像
private void MoverCurrentUserHead()
{
Vector3 prePos = img.transform.position;
int nextIndex = playerController.CurrentIndex;
var viewIndex = chartDataSourceScript.GetViewIndex(nextIndex);
if (!mainController.isStart && !mainController.isPause && !mainController.isQuit)//未开始未暂停未结束
{
viewIndex = 0;
}
var n = graph.DataSource.GetPoint("Player 2", viewIndex);
graph.PointToWorldSpace(out Vector3 nextPosition, n.x, n.y, "Player 2");
nextPosition.x -= 14f;
nextPosition.y += 5f;
//人物移动 停止条件 到中间且线未加载完
if (chartDataSourceScript.ReachMid(viewIndex) && !chartDataSourceScript.ReachEnd())
{
var currentDistance = playerController.CurrentDistance;
var distance = playerController.Distance;
var offset = currentDistance > 0 ? distance * 1000 / currentDistance : 1;
graph.HorizontalScrolling += offset;
img.transform.DOMove(new Vector3(prePos.x, nextPosition.y, 0), 1);
}
else
{
img.transform.DOMove(new Vector3(nextPosition.x , nextPosition.y, 0), 1);
}
img.transform.SetSiblingIndex(999);
}
//移动其他骑手头像
private void MoveOtherHeads()
{
var others = FindObjectsOfType<OtherPlayerController>();
foreach (var item in others)
{
var itemIndex = chartDataSourceScript.GetViewIndex(item.CurrentIndex);
if (!mainController.isStart && !mainController.isPause && !mainController.isQuit)//未开始未暂停未结束
{
itemIndex = 0;
}
var m = graph.DataSource.GetPoint("Player 2", itemIndex);
graph.PointToWorldSpace(out Vector3 itemPosition, m.x, m.y, "Player 2");
itemPosition.x -= 12f;
itemPosition.y += 5f;
item.MoveHead(graph.transform, itemPosition);
}
}
//移动总海拔图范围
private void MoveElevationImage()
{
if (chartDataSourceScript.mData.Count <= chartDataSourceScript.targetPoints)
{
leftImage.gameObject.SetActive(false);
rightImage.gameObject.SetActive(false);
altitudeGraph.gameObject.SetActive(false);
}
else
{
var start = chartDataSourceScript.GetRealTimeStart();
var end = chartDataSourceScript.GetRealTimeEnd();
//线即将加载完
var originWith = Screen.width / 1600D * 30D;
var with = Screen.width / 1600D * 286D;
var left = start * with + originWith;
var right = end * with + originWith;
//int del = (int)Math.Round(graph.DataSource.HorizontalViewSize / 2, 0);
//if (playerController.CurrentIndex % del == 0)
//{
// graph.HorizontalScrolling += 1;
//}
#region
//var dataPoints = elevationChart.series.list[0].dataPoints.OrderBy(c => c.x).ToList();
//if (dataPoints.Count > 0)
//{
// var pinLoction = dataPoints[index];
// pinLoction.y = img.transform.localPosition.y;
// img.transform.localPosition = pinLoction;
//}
//if (pointMap.ContainsKey(playerController.CurrentIndex-1) )
//{
// Vector3 mousePos;
// //testButton.transform.localPosition = new Vector3(pointMap[playerController.CurrentIndex - 1].x, pointMap[playerController.CurrentIndex - 1].y, 0);
// //RectTransformUtility.ScreenPointToLocalPointInRectangle(transform.parent.GetComponent<RectTransform>(), new Vector3(pointMap[playerController.CurrentIndex - 1].x , pointMap[playerController.CurrentIndex - 1].y, 0), null, out mousePos);
// ((RectTransform)testButton.transform).position = new Vector3(pointMap[playerController.CurrentIndex - 1].x, pointMap[playerController.CurrentIndex - 1].y, 0);
// //testButton.transform.position = new Vector3( pointMap[index].x, 229f, 0);
// //testButton.transform.position = new Vector3(pointMap[playerController.CurrentIndex-1].x, pointMap[playerController.CurrentIndex-1].y, 0);
// //testButton.transform.DOMove(new Vector3(pointMap[playerController.CurrentIndex].x, pointMap[playerController.CurrentIndex].y,0),1).on;
// //testButton.transform.DOLocalMove(new Vector3(pointMap[playerController.CurrentIndex - 1].x-Screen.width/2, pointMap[playerController.CurrentIndex - 1].y, 0),0.5f);
// //pointMap.Remove(playerController.CurrentIndex - 1);
//}
#endregion
leftImage.transform.DOMoveX((float)left, 1);
rightImage.transform.DOMoveX((float)right, 1);
}
}
}
}

View File

@ -72,11 +72,11 @@ namespace Assets.Scripts.Apis.Models
private void CalcDistance()
{
_List[0].Distance = 0;
//_List[0].Distance = 0;
for (int i = 1; i < _List.Count - 1; i++)
{
var pt1 = Turf.Point(new double[] { _List[i-1].Point[1], _List[i-1].Point[0] });
var pt2 = Turf.Point(new double[] { _List[i].Point[1], _List[i].Point[0] });
var pt1 = Turf.Point(new double[] { _List[i].Point[1], _List[i].Point[0] });
var pt2 = Turf.Point(new double[] { _List[i+1].Point[1], _List[i+1].Point[0] });
var value = Turf.Distance(pt1, pt2, "kilometers") ;
_List[i].Distance = Math.Round(value*1000, 2);
}

View File

@ -7,7 +7,7 @@ using UnityEngine;
public static class App
{
public static string Host = "http://192.168.0.101:5082/";
public static string Host = "http://192.168.0.97:5082/";
public static string AppVersion = "1.0.0";