Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3083224ee6 | ||
|
|
5ba176725f | ||
|
|
42e23e2f84 | ||
|
|
5480de5c6d | ||
|
|
e3e2f5200b | ||
|
|
6a4390f1b9 | ||
|
|
a73e125a49 | ||
|
|
3295314b7e | ||
|
|
8b3dd7a40a | ||
|
|
b79584f745 | ||
|
|
402f19b8a5 | ||
|
|
9acde45f4a | ||
|
|
004410048f | ||
|
|
f7b29819f6 | ||
|
|
7ebd5f59e3 | ||
|
|
e14a683f62 | ||
|
|
d754ff3b15 | ||
|
|
1bd1ffdb5a | ||
|
|
c50c229e30 | ||
|
|
50b46c5b76 |
No files matched your search
@@ -92,3 +92,4 @@ Assets/Mapbox/User.meta
|
||||
Packages/packages-lock.json
|
||||
GPUCache
|
||||
Assets/Shatalmic/plugin.unitypackage.meta
|
||||
.idea
|
||||
@@ -87,6 +87,7 @@ public class GUIMainNetWorkInfo : MonoBehaviour
|
||||
if (_delayTime != App.delayTime && dict!=null)
|
||||
{
|
||||
_delayTime = App.delayTime;
|
||||
Debug.Log("延迟"+_delayTime);
|
||||
if (NetImage)
|
||||
{
|
||||
if (_delayTime != -1)
|
||||
|
||||
@@ -81,6 +81,7 @@ namespace Mapbox.Unity.Telemetry
|
||||
postRequest.downloadHandler = new DownloadHandlerBuffer();
|
||||
postRequest.uploadHandler = new UploadHandlerRaw(bodyRaw);
|
||||
|
||||
postRequest.uploadHandler.Dispose();
|
||||
yield return postRequest.SendWebRequest();
|
||||
|
||||
while (!postRequest.isDone) { yield return null; }
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<package android:name="com.tencent.mm" />
|
||||
<package android:name="com.zhixingpai.powerfun" />
|
||||
</queries>
|
||||
<application android:requestLegacyExternalStorage="true">
|
||||
<application android:requestLegacyExternalStorage="true" >
|
||||
<activity android:name="com.unityplugins.imageselector.TestMainActivity"
|
||||
android:theme="@style/UnityThemeSelector"
|
||||
android:screenOrientation="landscape"
|
||||
|
||||
Binary file not shown.
@@ -97,14 +97,14 @@ TextureImporter:
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
maxTextureSize: 256
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureFormat: 48
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
compressionQuality: 100
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
overridden: 1
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f134d222725933a4a8aa79fee0ebc10c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -30,7 +30,7 @@ RectTransform:
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 189965521107699628}
|
||||
m_RootOrder: 1
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0.5}
|
||||
m_AnchorMax: {x: 1, y: 0.5}
|
||||
@@ -102,6 +102,7 @@ RectTransform:
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 1107195470343135181}
|
||||
- {fileID: 4347642619387382541}
|
||||
- {fileID: 5333104648953487716}
|
||||
- {fileID: 6514089965287851756}
|
||||
@@ -153,7 +154,7 @@ MonoBehaviour:
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 0}
|
||||
m_TargetGraphic: {fileID: 5133914736490982493}
|
||||
--- !u!1 &6092777681612193971
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -184,7 +185,7 @@ RectTransform:
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 189965521107699628}
|
||||
m_RootOrder: 2
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0.5}
|
||||
m_AnchorMax: {x: 0, y: 0.5}
|
||||
@@ -258,7 +259,7 @@ RectTransform:
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 189965521107699628}
|
||||
m_RootOrder: 0
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
@@ -336,7 +337,7 @@ RectTransform:
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 189965521107699628}
|
||||
m_RootOrder: 3
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 0.5}
|
||||
m_AnchorMax: {x: 1, y: 0.5}
|
||||
@@ -380,3 +381,77 @@ MonoBehaviour:
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &8209227311586515756
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1107195470343135181}
|
||||
- component: {fileID: 1947824279171277418}
|
||||
- component: {fileID: 5133914736490982493}
|
||||
m_Layer: 5
|
||||
m_Name: Panel
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1107195470343135181
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8209227311586515756}
|
||||
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: 189965521107699628}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1947824279171277418
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8209227311586515756}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &5133914736490982493
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8209227311586515756}
|
||||
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: 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
|
||||
@@ -1825,7 +1825,7 @@ PrefabInstance:
|
||||
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 20
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5329299856310536127, guid: 6b94e789d6585a04dbdc04c8a7cf97b2,
|
||||
type: 3}
|
||||
@@ -1960,7 +1960,7 @@ PrefabInstance:
|
||||
- target: {fileID: 2054923810110871857, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 20
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2054923810110871857, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
@@ -2185,7 +2185,7 @@ PrefabInstance:
|
||||
- target: {fileID: 5249748558008090706, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 20
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5249748558008090706, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
@@ -2215,7 +2215,7 @@ PrefabInstance:
|
||||
- target: {fileID: 6347209353323850145, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 20
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6347209353323850145, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
@@ -2255,7 +2255,7 @@ PrefabInstance:
|
||||
- target: {fileID: 8197454007437855745, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 20
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8197454007437855745, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
@@ -2275,7 +2275,7 @@ PrefabInstance:
|
||||
- target: {fileID: 8526344065104504758, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 20
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8526344065104504758, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -224,10 +224,10 @@ RectTransform:
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 7026691674002745911}
|
||||
- {fileID: 3931130817493022313}
|
||||
- {fileID: 4277467338018245799}
|
||||
- {fileID: 4071833300312694754}
|
||||
- {fileID: 7026691674002745911}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@@ -1270,7 +1270,7 @@ RectTransform:
|
||||
- {fileID: 4007984775395188520}
|
||||
- {fileID: 4160894300255257250}
|
||||
m_Father: {fileID: 1777885814862178517}
|
||||
m_RootOrder: 1
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
@@ -1566,7 +1566,7 @@ RectTransform:
|
||||
- {fileID: 2929594986700416000}
|
||||
- {fileID: 989933865135911001}
|
||||
m_Father: {fileID: 1777885814862178517}
|
||||
m_RootOrder: 2
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
@@ -3462,7 +3462,7 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 7711159166601146376}
|
||||
m_Father: {fileID: 1777885814862178517}
|
||||
m_RootOrder: 3
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
@@ -3858,6 +3858,16 @@ PrefabInstance:
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 485508193206389098, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 485508193206389098, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -44
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 829206726517620079, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_Spacing
|
||||
@@ -3966,7 +3976,7 @@ PrefabInstance:
|
||||
- target: {fileID: 2638424933752433027, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 0
|
||||
value: 3
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2638424933752433027, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
|
||||
@@ -5295,11 +5295,51 @@ PrefabInstance:
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 465239219729653177}
|
||||
m_Modifications:
|
||||
- target: {fileID: 485508193206389098, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 485508193206389098, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 485508193206389098, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 485508193206389098, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 485508193206389098, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 485508193206389098, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 485508193206389098, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 485508193206389098, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 44
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 485508193206389098, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 829206726517620079, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_Spacing
|
||||
@@ -5398,12 +5438,12 @@ PrefabInstance:
|
||||
- target: {fileID: 2054923810110871857, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2054923810110871857, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2054923810110871857, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
@@ -5413,7 +5453,7 @@ PrefabInstance:
|
||||
- target: {fileID: 2054923810110871857, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
value: -9
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2638424933752433026, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
@@ -5608,12 +5648,12 @@ PrefabInstance:
|
||||
- target: {fileID: 5249748558008090706, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5249748558008090706, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5249748558008090706, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
@@ -5623,7 +5663,7 @@ PrefabInstance:
|
||||
- target: {fileID: 5249748558008090706, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
value: -9
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5972488954695143433, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
@@ -5633,12 +5673,12 @@ PrefabInstance:
|
||||
- target: {fileID: 6347209353323850145, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6347209353323850145, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6347209353323850145, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
@@ -5648,7 +5688,7 @@ PrefabInstance:
|
||||
- target: {fileID: 6347209353323850145, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
value: -9
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6731556475519980336, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
@@ -5693,12 +5733,12 @@ PrefabInstance:
|
||||
- target: {fileID: 8197454007437855745, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8197454007437855745, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8197454007437855745, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
@@ -5708,17 +5748,17 @@ PrefabInstance:
|
||||
- target: {fileID: 8197454007437855745, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
value: -9
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8526344065104504758, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8526344065104504758, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8526344065104504758, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
@@ -5728,7 +5768,7 @@ PrefabInstance:
|
||||
- target: {fileID: 8526344065104504758, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
value: -2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9135822971364406318, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
|
||||
@@ -1839,11 +1839,51 @@ PrefabInstance:
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 3445340291243714514}
|
||||
m_Modifications:
|
||||
- target: {fileID: 485508193206389098, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 485508193206389098, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 485508193206389098, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 485508193206389098, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 485508193206389098, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 485508193206389098, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 485508193206389098, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 485508193206389098, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 44
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 485508193206389098, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1372841062299834888, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
|
||||
@@ -320,7 +320,7 @@ RectTransform:
|
||||
- {fileID: 7825229638776794366}
|
||||
- {fileID: 7285418945995382289}
|
||||
m_Father: {fileID: 1673965681348374004}
|
||||
m_RootOrder: 3
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0.5}
|
||||
m_AnchorMax: {x: 0, y: 0.5}
|
||||
@@ -946,12 +946,12 @@ RectTransform:
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 7118448401530350836}
|
||||
- {fileID: 7081805938635351733}
|
||||
- {fileID: 3808910954941481150}
|
||||
- {fileID: 6595848013761631944}
|
||||
- {fileID: 4408462524766711656}
|
||||
- {fileID: 7578623247347515893}
|
||||
- {fileID: 7118448401530350836}
|
||||
- {fileID: 9114115754477968003}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
@@ -1459,7 +1459,7 @@ RectTransform:
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1673965681348374004}
|
||||
m_RootOrder: 5
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
@@ -1654,7 +1654,7 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 1584307428038433354}
|
||||
m_Father: {fileID: 1673965681348374004}
|
||||
m_RootOrder: 4
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
@@ -2135,7 +2135,7 @@ RectTransform:
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1673965681348374004}
|
||||
m_RootOrder: 2
|
||||
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}
|
||||
@@ -2338,7 +2338,7 @@ RectTransform:
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1673965681348374004}
|
||||
m_RootOrder: 1
|
||||
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}
|
||||
@@ -3671,11 +3671,51 @@ PrefabInstance:
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 1673965681348374004}
|
||||
m_Modifications:
|
||||
- target: {fileID: 485508193206389098, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 485508193206389098, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 485508193206389098, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 485508193206389098, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 485508193206389098, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 485508193206389098, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 485508193206389098, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 485508193206389098, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 44
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 485508193206389098, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1372841062299834888, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
@@ -3799,7 +3839,7 @@ PrefabInstance:
|
||||
- target: {fileID: 2638424933752433027, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 0
|
||||
value: 5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2638424933752433027, guid: a1999d0576fee6248a9c5a507ae8d10e,
|
||||
type: 3}
|
||||
|
||||
+1513
-1513
File diff suppressed because it is too large.
Load diff
+1466
-1509
File diff suppressed because it is too large.
Load diff
@@ -424,7 +424,7 @@ MonoBehaviour:
|
||||
UserName:
|
||||
rasterOptions:
|
||||
useRetina: 0
|
||||
useCompression: 0
|
||||
useCompression: 1
|
||||
useMipMap: 0
|
||||
_terrain:
|
||||
_layerProperty:
|
||||
@@ -4962,7 +4962,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!4 &1552436184
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
using Assets.Scripts;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
@@ -34,7 +36,6 @@ namespace Assets.Scripts.Apis
|
||||
{
|
||||
//http = new EasyHttp.Http.HttpClient();
|
||||
//http.Request.PersistCookies = true;
|
||||
|
||||
httpClientHandler = new PfHttpClientHandler();
|
||||
httpClientHandler.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
|
||||
httpClientHandler.Proxy = WebRequest.GetSystemWebProxy();
|
||||
@@ -292,8 +293,16 @@ namespace Assets.Scripts.Apis
|
||||
request.CookieContainer.Add(item);
|
||||
}
|
||||
|
||||
var settings = new JsonSerializerSettings();
|
||||
|
||||
settings.Converters.Add(new IsoDateTimeConverter
|
||||
{
|
||||
Culture = CultureInfo.CurrentCulture,
|
||||
DateTimeStyles = DateTimeStyles.AssumeLocal
|
||||
});
|
||||
|
||||
var postData = new StringBuilder();
|
||||
var values = JsonConvert.DeserializeObject<Dictionary<string, string>>(JsonConvert.SerializeObject(data));
|
||||
var values = JsonConvert.DeserializeObject<Dictionary<string, string>>(JsonConvert.SerializeObject(data, settings));
|
||||
foreach (var item in values)
|
||||
{
|
||||
postData.Append(WebUtility.UrlEncode($"{ item.Key }={ item.Value }&"));
|
||||
|
||||
@@ -25,5 +25,7 @@ namespace Assets.Scripts.Apis.Models
|
||||
public string NickName { get; set; }
|
||||
|
||||
public double WeightKg { get; set; }
|
||||
public double Weight { get; set; }
|
||||
public double BikeWeight { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,7 @@ namespace Assets.Scripts.Apis
|
||||
if (json.code == 401)
|
||||
{
|
||||
App.is401 = json.errMsg;
|
||||
UIManager.Instance.StartCoroutine(LoadLogin(json.errMsg));
|
||||
UnityMainThreadDispatcher.Instance().Enqueue(LoadLogin(json.errMsg));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -23,5 +23,11 @@ namespace Assets.Scripts.Apis
|
||||
//pk.eyJ1IjoiYW5keXNqdCIsImEiOiJja2ZhajE5OGwwamRiMnltcW96bHk0ZWFuIn0.GvKanc6UveWSvIjS9HfBPA
|
||||
//pk.eyJ1IjoiYW5keXNqdCIsImEiOiJja2ZhajE5OGwwamRiMnltcW96bHk0ZWFuIn0.GvKanc6UveWSvIjS9HfBPA
|
||||
}
|
||||
public async Task<Stream> GetMapImage(double latitude,double longitude)
|
||||
{
|
||||
return await GetThirdPartStreamAsync($"https://api.mapbox.com/styles/v1/juzetest/ckmkdjwsa1nvt17nr1ps4fqgs/static/{longitude.ToString(CultureInfo.InvariantCulture)},{latitude.ToString(CultureInfo.InvariantCulture)},12,0/1280x1280?access_token=pk.eyJ1IjoianV6ZXRlc3QiLCJhIjoiY2ttazhsbnpiMGVrdjJucGhyNnh6eXcxYSJ9.6zj2U9eFCNJRMljNlMxjVg");
|
||||
//pk.eyJ1IjoiYW5keXNqdCIsImEiOiJja2ZhajE5OGwwamRiMnltcW96bHk0ZWFuIn0.GvKanc6UveWSvIjS9HfBPA
|
||||
//pk.eyJ1IjoiYW5keXNqdCIsImEiOiJja2ZhajE5OGwwamRiMnltcW96bHk0ZWFuIn0.GvKanc6UveWSvIjS9HfBPA
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ using System.Timers;
|
||||
|
||||
public static class App
|
||||
{
|
||||
public static string Host = "http://192.168.0.101:5085/";
|
||||
public static string Host = "http://192.168.0.101:5084/";
|
||||
|
||||
public static string AppVersion = Application.version;
|
||||
|
||||
@@ -109,9 +109,10 @@ public static class App
|
||||
//UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21000);
|
||||
//TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21001);
|
||||
Host = "https://wx.powerfun.com.cn/";
|
||||
//Host = "http://192.168.0.101:5084/";
|
||||
UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 11000);
|
||||
TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 11001);
|
||||
|
||||
Debug.unityLogger.logEnabled = false;
|
||||
#endif
|
||||
var isRower = PlayerPrefs.GetString("IsRowerMode");
|
||||
if (!string.IsNullOrEmpty(isRower))
|
||||
|
||||
@@ -66,7 +66,7 @@ public class LoginControllerMobile : MonoBehaviour, INativeOnMobileWxLoginResp
|
||||
transform.Find("Version").gameObject.SetActive(false);
|
||||
UIManager.ShowAndroidUpdate(info);
|
||||
}
|
||||
|
||||
App.WorkoutsUrl = r.data.Value<JObject>("Apk").Value<string>("Url");
|
||||
#elif UNITY_IOS
|
||||
var sw = r.data.Value<string>("ThirdPartSwitch");
|
||||
transform.Find("Panel/LoginContainer/LoginScrollView/Viewport/Content/FormContainer-Login/Mask/FormContainer/BtnThirdLogin")
|
||||
@@ -77,8 +77,9 @@ public class LoginControllerMobile : MonoBehaviour, INativeOnMobileWxLoginResp
|
||||
Application.OpenURL(info.Value<string>("Url"));
|
||||
Application.Quit();
|
||||
}
|
||||
App.WorkoutsUrl = r.data.Value<JObject>("Ios").Value<string>("Url");
|
||||
#endif
|
||||
App.WorkoutsUrl = info.Value<string>("Url");
|
||||
|
||||
#endif
|
||||
}
|
||||
//if (r.result)
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Assets.Scripts.Scenes
|
||||
while (true)
|
||||
{
|
||||
ping = new Ping("47.97.84.8");
|
||||
yield return new WaitForSeconds(1);
|
||||
yield return new WaitForSeconds(5);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,6 +51,23 @@ namespace Assets.Scripts.Scenes
|
||||
App.MainDeviceAdapter.Dispose();
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
var objAry = Resources.FindObjectsOfTypeAll<Material>();
|
||||
|
||||
for (int i = 0; i < objAry.Length; ++i)
|
||||
{
|
||||
objAry[i] = null;//解除资源的引用
|
||||
}
|
||||
var objAry2 = Resources.FindObjectsOfTypeAll<Texture>();
|
||||
for (int i = 0; i < objAry2.Length; ++i)
|
||||
{
|
||||
objAry2[i] = null;//解除资源的引用
|
||||
}
|
||||
Resources.UnloadUnusedAssets();
|
||||
GC.Collect();
|
||||
}
|
||||
|
||||
private void OnApplicationPause(bool focus)
|
||||
{
|
||||
if (focus)
|
||||
|
||||
@@ -579,6 +579,22 @@ public class LoginController : BaseScene
|
||||
{
|
||||
if (!App.TextureCache.ContainsKey("rotateImage"))
|
||||
{
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
StartCoroutine(Utils.StartLocation(async loc =>
|
||||
{
|
||||
App.latitude = loc.latitude;
|
||||
App.longitude = loc.longitude;
|
||||
var i = await ConfigHelper.thirdPartApi.GetMapImage(loc.latitude,loc.longitude);
|
||||
var t = new Texture2D(4, 4,TextureFormat.ASTC_RGB_4x4, false);
|
||||
if (t.LoadImage(Utils.StreamToBytes(i)))
|
||||
{
|
||||
Debug.Log("成功");
|
||||
App.TextureCache["rotateImage"] = t;
|
||||
Utils.WriteTextureToPlayerPrefs("rotateImage", t);
|
||||
}
|
||||
}));
|
||||
#else
|
||||
|
||||
var locationInfo = await ConfigHelper.thirdPartApi.GetLocationInfo();
|
||||
App.latitude = locationInfo.latitude;
|
||||
App.longitude = locationInfo.longitude;
|
||||
@@ -595,7 +611,7 @@ public class LoginController : BaseScene
|
||||
//}
|
||||
Debug.Log(JsonConvert.SerializeObject(locationInfo));
|
||||
var i = await ConfigHelper.thirdPartApi.GetMapImage(locationInfo);
|
||||
var t = new Texture2D(2, 2);
|
||||
var t = new Texture2D(4, 4,TextureFormat.DXT5, false);
|
||||
if (t.LoadImage(Utils.StreamToBytes(i)))
|
||||
{
|
||||
Debug.Log("成功");
|
||||
@@ -606,6 +622,7 @@ public class LoginController : BaseScene
|
||||
//Utils.DownloadImageToLocal(StartCoroutine,
|
||||
//$"https://api.mapbox.com/styles/v1/mapbox/dark-v10/static/{locationInfo.longitude},{locationInfo.latitude},12.14,0/1280x1280?access_token=pk.eyJ1IjoiYW5keXNqdCIsImEiOiJja2ZhajE5OGwwamRiMnltcW96bHk0ZWFuIn0.GvKanc6UveWSvIjS9HfBPA",
|
||||
//"rotateImage");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
@@ -55,6 +55,17 @@ namespace Assets.Scenes.Ride.Scripts.Model.CyclingModels
|
||||
//AntModelId = antModelId
|
||||
};
|
||||
|
||||
if (param != null)
|
||||
{
|
||||
recorderData.ContinueIndex = param.ContinueIndex??0;
|
||||
if (!string.IsNullOrEmpty(param.ContinueMark)) {
|
||||
recorderData.ContinueMark = param.ContinueMark;
|
||||
}
|
||||
recorderData.EndDistance = param.EndDistance;
|
||||
recorderData.PreDistance = param.EndDistance;
|
||||
recorderData.CurrentRouteStartDistance = param.EndDistance;
|
||||
}
|
||||
|
||||
//recorderData = recorderData1;
|
||||
this.IsRecord = true;
|
||||
//riders = riders1;
|
||||
|
||||
@@ -365,7 +365,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
|
||||
#region UI行为
|
||||
|
||||
protected virtual void MoveGraphHead()
|
||||
protected virtual void MoveGraphHead(bool init = false)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -31,6 +31,8 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
public RouteResultParam selectParamModel;
|
||||
public RouteResult routeResult;
|
||||
|
||||
public GameObject minicamera;
|
||||
|
||||
public Dictionary<int, SeletedPlayerScript> selectPlayerDic { set; get; } = new Dictionary<int, SeletedPlayerScript>();
|
||||
|
||||
public int preticks;
|
||||
@@ -80,17 +82,6 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
//获取路书信息
|
||||
mapApi = ConfigHelper.mapApi;
|
||||
routeId = App.RouteIdParam > 0? App.RouteIdParam : 2633;
|
||||
//mapRoute = mapApi.GetById(routeId).data;
|
||||
//miniMap = transform.Find("MiniMap").gameObject;//小地图
|
||||
//var panel = Instantiate(Resources.Load<GameObject>("UI/Prefab/Ride/Panel"), UIObject.transform);
|
||||
|
||||
//resultPanel = transform.Find("UI/Panel/ResultPanel").gameObject;
|
||||
|
||||
////获取海拔图UI对象
|
||||
//var graphObject = transform.Find("UI/Panel/GraphChart");
|
||||
//chartDataSourceScript = graphObject.GetComponent<ChartDataSourceScript>();
|
||||
//graph = graphObject.GetComponent<GraphChartBase>();
|
||||
|
||||
competitionId = App.CompetionId;
|
||||
App.CompetionId = 0;//清空比赛参数
|
||||
Resources.UnloadUnusedAssets();
|
||||
@@ -98,8 +89,8 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
//App.TextureCache.Clear();
|
||||
Resources.UnloadUnusedAssets();
|
||||
GC.Collect();
|
||||
}
|
||||
Transform target;
|
||||
GameObject watcher;
|
||||
@@ -119,6 +110,8 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
return OnlineHeadPanel;
|
||||
}
|
||||
Material Graph3d { get; set; }
|
||||
Material Graph4 { get; set; }
|
||||
Material Graph1 { get; set; }
|
||||
public Material Get3dGraph2()
|
||||
{
|
||||
if (Graph3d == null)
|
||||
@@ -127,6 +120,26 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
}
|
||||
return Graph3d;
|
||||
}
|
||||
|
||||
public Material GetMaterial4()
|
||||
{
|
||||
if (Graph4 == null)
|
||||
{
|
||||
Graph4 = Resources.Load<Material>("UI/Material/4");
|
||||
}
|
||||
return Graph4;
|
||||
}
|
||||
|
||||
|
||||
public Material GetMaterial1()
|
||||
{
|
||||
if (Graph1 == null)
|
||||
{
|
||||
Graph1 = Resources.Load<Material>("UI/Material/1");
|
||||
}
|
||||
return Graph1;
|
||||
}
|
||||
|
||||
Image CompetitionArrow { get; set; }
|
||||
public Image GetCompetitionArrow()
|
||||
{
|
||||
@@ -184,7 +197,7 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
watcher = Resources.Load<GameObject>("UI/Prefab/Match/Watcher");
|
||||
target = transform.Find("Target");
|
||||
miniMap = transform.Find("MiniMap").gameObject;//小地图
|
||||
|
||||
minicamera = transform.Find("MiniCamera").gameObject;
|
||||
//进入倒计时
|
||||
singleUIManager = UIObject.GetComponent<BaseUIManager>();
|
||||
TrailRenderer trail = player.GetComponent<TrailRenderer>();
|
||||
@@ -328,19 +341,8 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
App.routeResult = null;
|
||||
|
||||
#endregion
|
||||
////异步请求mapbox画出当前路书路线图
|
||||
//loadingController.DrawMapRouteAsync(mapRoute.Id);
|
||||
//loadingController.AddProcess(10);
|
||||
//计算上次骑行距离调整地图中心点
|
||||
double endDistance = selectParamModel.EndDistance;
|
||||
coordiantes = Along(endDistance);
|
||||
////查询排行榜
|
||||
//var list = mapApi.GetRouteRanking(App.RouteIdParam, "1", 0, 10, "");
|
||||
//if (list.result)
|
||||
//{
|
||||
// loadingController.CreateRankingList(list.data.list);
|
||||
// loadingController.AddProcess(10);
|
||||
//}
|
||||
var shaowList = mapApi.GetShadowList(App.RouteIdParam, "", 0, 10);
|
||||
if (shaowList.result)
|
||||
{
|
||||
@@ -377,17 +379,23 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
//加载人物和地图以及UI界面
|
||||
private void InitGameObject()
|
||||
{
|
||||
#if !(UNITY_IOS || UNITY_ANDROID)
|
||||
minicamera.SetActive(true);
|
||||
miniMap.SetActive(true);
|
||||
#endif
|
||||
map.gameObject.SetActive(true);
|
||||
player.SetActive(true);
|
||||
UIObject.SetActive(true);
|
||||
singleUIManager = UIObject.AddComponent<SingleUIManager>();
|
||||
miniMap.SetActive(true);
|
||||
map.OnTileFinished += Map_OnTileFinished;
|
||||
mapPos = map.transform.position;
|
||||
}
|
||||
|
||||
private void InitRaceGameObject()
|
||||
{
|
||||
#if !(UNITY_IOS || UNITY_ANDROID)
|
||||
minicamera.SetActive(true);
|
||||
#endif
|
||||
map.gameObject.SetActive(true);
|
||||
player.SetActive(true);
|
||||
UIObject.SetActive(true);
|
||||
@@ -399,8 +407,8 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
RangeAroundTransformTileProviderOptions options = new RangeAroundTransformTileProviderOptions
|
||||
{
|
||||
targetTransform = target,
|
||||
visibleBuffer = 4,
|
||||
disposeBuffer = 4
|
||||
visibleBuffer = 2,
|
||||
disposeBuffer = 2
|
||||
};
|
||||
map.SetExtent(MapExtentType.RangeAroundTransform, options);
|
||||
map.SetExtentOptions(options);
|
||||
@@ -488,7 +496,7 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
//初始化海拔图头像位置
|
||||
var index = GetCurrentIndex(recorderData.EndDistance);
|
||||
InitGraph(index);
|
||||
//playerController.InitGraph(index);
|
||||
playerController.CurrentIndex = index;
|
||||
}
|
||||
public void InitGraph(int index)
|
||||
{
|
||||
@@ -499,9 +507,9 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
public void GameStart()
|
||||
{
|
||||
var check = CheckAnt();
|
||||
//#if UNITY_EDITOR
|
||||
// check = true;
|
||||
//#endif
|
||||
#if UNITY_EDITOR
|
||||
check = true;
|
||||
#endif
|
||||
if (check)
|
||||
{
|
||||
singleUIManager.StartRide();
|
||||
@@ -896,7 +904,7 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
RenderTexture.active = null; // JC: added to avoid errors
|
||||
GameObject.Destroy(rt);
|
||||
// 最后将这些纹理数据,成一个图片文件
|
||||
byte[] bytes = screenShot.EncodeToPNG();
|
||||
byte[] bytes = screenShot.EncodeToJPG();
|
||||
|
||||
//var path = Helper.GetDataDir("MapWorkoutRecords/images");
|
||||
//string filename = path + "/" + Guid.NewGuid().ToString() + ".png";
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
var nearList = MapUDPService.GetNearRiderData(pageIndex, pageSize, new double[] { playerController.Currentlatlong.x, playerController.Currentlatlong.y });
|
||||
var mod = MapUDPService.GetNearRiderCount() % pageSize;
|
||||
var pages = MapUDPService.GetNearRiderCount() / pageSize;
|
||||
totalPages = mod > 0 ? pages + 1: pages;
|
||||
totalPages = mod > 0 ? pages + 1 : pages;
|
||||
//删除
|
||||
var currentNearList = FindObjectsOfType<NearByItemScript>();
|
||||
foreach (var item in currentNearList)
|
||||
@@ -54,14 +54,14 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
|
||||
for (int i = 0; i < nearList.Count(); i++)
|
||||
{
|
||||
Create(nearList[i]);
|
||||
Create(nearList[i], currentNearList);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void Create(NearRiderModel item)
|
||||
private void Create(NearRiderModel item, NearByItemScript[] rankingList)
|
||||
{
|
||||
var rankingList = FindObjectsOfType<NearByItemScript>();
|
||||
//var rankingList = FindObjectsOfType<NearByItemScript>();
|
||||
var nearByItemscript = rankingList.Where(c => c.UserId == item.Id).FirstOrDefault();
|
||||
//如果当前有这个用户则更新没有则创建并setslibingindex
|
||||
if (nearByItemscript == null)
|
||||
@@ -86,8 +86,13 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
nearByItemscript.setName(item.Name);
|
||||
nearByItemscript.setRatio(item.KGWeight + "W/KG");
|
||||
nearByItemscript.setSpeed(item.Speed.ToString() + "KM/H");
|
||||
nearByItemscript.setHead(item.Headimage);
|
||||
if (cyclingController.currentPlayer.UserId == item.Id)
|
||||
{
|
||||
nearByItemscript.setHead(item.Headimage);
|
||||
}
|
||||
#if !(UNITY_IOS || UNITY_ANDROID)
|
||||
nearByItemscript.setCountry(cyclingController.GetCountryImageByName(item.Country));
|
||||
#endif
|
||||
nearByItemscript.setDistance(item.Near.ToString() + "KM");
|
||||
nearByItemscript.transform.SetSiblingIndex((int)item.Near);
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
trailRenderer = FindObjectOfType<TrailRenderer>();
|
||||
//var color7 = Resources.Load<Material>("UI/Material/color7");
|
||||
var Graph2 = mainController.Get3dGraph2(); //Resources.Load<Material>("UI/Material/3dGraph2");
|
||||
trailRenderer.materials = new Material[] { Graph2 };
|
||||
trailRenderer.material = Graph2;//new Material[] { Graph2 };
|
||||
trailRenderer.time = 30;
|
||||
trailRenderer.startWidth = 1f;
|
||||
trailRenderer.endWidth = 1f;
|
||||
@@ -222,7 +222,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
_directionsGO.transform.SetParent(transform);
|
||||
var lineRender = _directionsGO.AddComponent<LineRenderer>();
|
||||
//lineRender.material = new Material(Shader.Find("Sprites/Default"));
|
||||
lineRender.material = Resources.Load<Material>("UI/Material/4");
|
||||
lineRender.material = mainController.GetMaterial4(); //Resources.Load<Material>("UI/Material/4");
|
||||
lineRender.endColor = new Color(0.1529412f, 0.8745098f, 0.8901961f, 1f);
|
||||
lineRender.startColor = new Color(0.1529412f, 0.8745098f, 0.8901961f, 1f);
|
||||
|
||||
@@ -236,7 +236,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
lineRender.numCornerVertices = 10;
|
||||
}
|
||||
|
||||
protected override void MoveGraphHead()
|
||||
protected override void MoveGraphHead(bool init=false)
|
||||
{
|
||||
if (mainController.cyclingModel == CyclingModel.Competition)
|
||||
{
|
||||
@@ -258,10 +258,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
headPanel.transform.SetParent(graph.transform);
|
||||
headPanel.transform.localScale = new Vector3(0.8f, 0.8f, 0.8f);
|
||||
}
|
||||
if (CurrentIndex == 1)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int nextIndex = CurrentIndex;
|
||||
var viewIndex = chartDataSourceScript.GetViewIndex(nextIndex);
|
||||
//人物移动 停止条件 到中间且线未加载完
|
||||
|
||||
@@ -36,6 +36,13 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
//创建UI
|
||||
uiObject = uipanel.transform.Find("ArrowList");
|
||||
arrowImage = Instantiate(Resources.Load<Image>("UI/Prefab/Ride/ReviewArrow"), uiObject);
|
||||
//初始化位置
|
||||
Compute();
|
||||
var initPos = map.GeoToWorldPosition(currentlatlong);
|
||||
initPos.y += 1.35f;//提高y轴让人物站在地图上面
|
||||
transform.localPosition = initPos;
|
||||
CurrentIndex = mainController.GetCurrentIndex(totalDistance);
|
||||
MoveGraphHead(true);
|
||||
}
|
||||
|
||||
double diff = 0;
|
||||
@@ -123,7 +130,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
var lineRender = _directionsGO.AddComponent<LineRenderer>();
|
||||
//lineRender.material = new Material(Shader.Find("Sprites/Default"));
|
||||
//lineRender.material = Resources.Load<Material>("UI/Material/color8");
|
||||
lineRender.material = Resources.Load<Material>("UI/Material/1");
|
||||
lineRender.material = mainController.GetMaterial1(); //Resources.Load<Material>("UI/Material/1");
|
||||
lineRender.endColor = new Color(1, 1f, 1f, 0.65f);
|
||||
lineRender.startColor = new Color(1, 1f, 1f, 0.65f);
|
||||
|
||||
@@ -157,7 +164,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
}
|
||||
}
|
||||
|
||||
protected override void MoveGraphHead()
|
||||
protected override void MoveGraphHead(bool init = false)
|
||||
{
|
||||
var itemIndex = chartDataSourceScript.GetViewIndex(CurrentIndex);
|
||||
var m = graph.DataSource.GetPoint("Player 2", itemIndex);
|
||||
@@ -176,7 +183,8 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
head = headPanel.GetComponentInChildren<RawImage>();
|
||||
head.texture = _reviewItemScript.GetHead();
|
||||
}
|
||||
headPanel.transform.DOMove(new Vector3(itemPosition.x, itemPosition.y, 0), 1);
|
||||
var duration = init ? 0 : 1;
|
||||
headPanel.transform.DOMove(new Vector3(itemPosition.x, itemPosition.y, 0), duration);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -43,6 +43,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
trail.enabled = false;
|
||||
|
||||
headPanel = uipanel.transform.Find("GraphChart/HeadPanel").gameObject;
|
||||
MoveGraphHead(true);
|
||||
}
|
||||
TargetData targetData;
|
||||
/// <summary>
|
||||
@@ -134,7 +135,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
// chartDataSourceScript.InitHorizontalScrolling(index);
|
||||
//}
|
||||
//移动海拔图头像
|
||||
protected override void MoveGraphHead()
|
||||
protected override void MoveGraphHead(bool init = false)
|
||||
{
|
||||
Vector3 oldPos = headPanel.transform.position;
|
||||
int nextIndex = CurrentIndex;
|
||||
@@ -154,7 +155,8 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
{
|
||||
graph.HorizontalScrolling += offset;
|
||||
}
|
||||
headPanel.transform.DOMove(new Vector3(oldPos.x, nextPosition.y, 0), 1);
|
||||
var duration = init ? 0 : 1;
|
||||
headPanel.transform.DOMove(new Vector3(oldPos.x, nextPosition.y, 0), duration);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -58,7 +58,6 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
break;
|
||||
case Model.CyclingModel.Review:
|
||||
singleArea.SetActive(false);
|
||||
//InitReview();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -101,12 +100,12 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
otherPlayerObj.transform.position = cyclingController.map.GeoToWorldPosition(cyclingController.Along(0));
|
||||
var otherPlayerController = otherPlayerObj.GetComponent<OtherPlayerController>();
|
||||
otherList.Add(otherPlayerController);
|
||||
otherPlayerController.record = item.record;
|
||||
|
||||
otherPlayerController.Weight = cyclingController.selectPlayerDic[item.UserId].Weight;
|
||||
otherPlayerController.BikeWeight = cyclingController.selectPlayerDic[item.UserId].BikeWeight;
|
||||
|
||||
otherPlayerController.record = item.record;
|
||||
otherPlayerController.Weight = item.Weight;
|
||||
otherPlayerController.BikeWeight = item.BikeWeight;
|
||||
otherPlayerController.SetController(reviewItemScript);
|
||||
|
||||
GameObject miniPlayer = (GameObject)Instantiate(miniMapPlayer, transform.parent.parent.parent);
|
||||
var miniController = miniPlayer.GetComponent<MiniMapPlayerController>();
|
||||
miniController.SetController(otherPlayerController);
|
||||
|
||||
@@ -11,7 +11,7 @@ using System;
|
||||
|
||||
namespace Assets.Scenes.Ride.Scripts
|
||||
{
|
||||
public class RouteController : MonoBehaviour
|
||||
public class RouteController : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
AbstractMap _map;
|
||||
@@ -21,7 +21,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
Material _material;
|
||||
[SerializeField]
|
||||
[Range(1, 10)]
|
||||
private float UpdateFrequency = 0.1f;
|
||||
private float UpdateFrequency = 1f;
|
||||
|
||||
private int _counter;
|
||||
|
||||
@@ -31,33 +31,35 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
CyclingController cyclingCotroller;
|
||||
private bool initComplete = false;
|
||||
|
||||
Material Graph2 { get; set; }
|
||||
Material linematerial { get; set; }
|
||||
|
||||
protected virtual void Awake()
|
||||
{
|
||||
if (_map == null)
|
||||
{
|
||||
_map = FindObjectOfType<AbstractMap>();
|
||||
}
|
||||
// _map.OnInitialized += _map_OnInitialized; ;
|
||||
//_map.OnUpdated += _map_OnUpdated; ;
|
||||
|
||||
|
||||
|
||||
// _map.OnInitialized += _map_OnInitialized; ;
|
||||
//_map.OnUpdated += _map_OnUpdated; ;
|
||||
Graph2 = Resources.Load<Material>("UI/Material/3dGraph2");
|
||||
linematerial = Resources.Load<Material>("UI/Material/3");
|
||||
}
|
||||
|
||||
private void _map_OnUpdated()
|
||||
{
|
||||
private void _map_OnUpdated()
|
||||
{
|
||||
Debug.Log("_map_OnUpdated");
|
||||
}
|
||||
}
|
||||
|
||||
private void _map_OnInitialized()
|
||||
{
|
||||
private void _map_OnInitialized()
|
||||
{
|
||||
Debug.Log("_map_OnInitialized");
|
||||
CreateRoute();
|
||||
}
|
||||
|
||||
private void _map_OnTileFinished(UnityTile obj)
|
||||
{
|
||||
|
||||
private void _map_OnTileFinished(UnityTile obj)
|
||||
{
|
||||
|
||||
if (!initComplete)
|
||||
{
|
||||
CreateRoute(obj);
|
||||
@@ -94,7 +96,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
void CreateRoute(UnityTile tile)
|
||||
{
|
||||
{
|
||||
var meshData = new MeshData();
|
||||
//var meshData = new MeshData();
|
||||
var dat = new List<Vector3>();
|
||||
var path = new List<Vector3>();
|
||||
|
||||
@@ -121,13 +123,13 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
if (diffAbs <= 200)
|
||||
{
|
||||
//if (!dat.Contains(item))
|
||||
dat.Add(item);
|
||||
dat.Add(item);
|
||||
}
|
||||
if (diff <= 0 && diff > -200)
|
||||
{
|
||||
item.y += 0.15f;
|
||||
//if (!dat.Contains(item))
|
||||
path.Add(item);
|
||||
path.Add(item);
|
||||
}
|
||||
}
|
||||
var feat = new VectorFeatureUnity();
|
||||
@@ -161,7 +163,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
bool foundTile = _map.MapVisualizer.ActiveTiles.TryGetValue(Conversions.LatitudeLongitudeToTileId(_map.CenterLatitudeLongitude.x, _map.CenterLatitudeLongitude.y, (int)_map.Zoom), out tile);
|
||||
if (foundTile)
|
||||
{
|
||||
var meshData = new MeshData();
|
||||
//var meshData = new MeshData();
|
||||
var dat = new List<Vector3>();
|
||||
|
||||
var mapData = cyclingCotroller.GetMapData();
|
||||
@@ -188,16 +190,16 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
{
|
||||
if (_directionsGO != null)
|
||||
{
|
||||
_directionsGO.Destroy();
|
||||
DestroyImmediate(_directionsGO);
|
||||
}
|
||||
_directionsGO = new GameObject("MapRoute");
|
||||
_directionsGO.transform.parent = transform;
|
||||
var lineRender = _directionsGO.AddComponent<LineRenderer>();
|
||||
//lineRender.material = new Material(Shader.Find("Sprites/Default"));
|
||||
lineRender.material = Resources.Load<Material>("UI/Material/3");
|
||||
lineRender.material = linematerial; //Resources.Load<Material>("UI/Material/3");
|
||||
var dat = feat.Points[0];
|
||||
ColorUtility.TryParseHtmlString("#FF2742", out Color c);
|
||||
lineRender.endColor = new Color(1,1,1,0.65f);
|
||||
lineRender.endColor = new Color(1, 1, 1, 0.65f);
|
||||
lineRender.startColor = new Color(1, 1, 1, 0.65f);
|
||||
|
||||
//设置宽度
|
||||
@@ -205,26 +207,26 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
lineRender.endWidth = 1.5f;
|
||||
lineRender.positionCount = dat.Count;
|
||||
lineRender.SetPositions(feat.Points[0].ToArray());
|
||||
lineRender.loop = false;
|
||||
lineRender.numCapVertices = 10;
|
||||
//lineRender.numCornerVertices = 30;
|
||||
lineRender.loop = false;
|
||||
lineRender.numCapVertices = 10;
|
||||
//lineRender.numCornerVertices = 30;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void CreatPathRoute(List<Vector3> feat)
|
||||
{
|
||||
if (_pathRoute != null)
|
||||
{
|
||||
_pathRoute.Destroy();
|
||||
DestroyImmediate(_pathRoute);
|
||||
}
|
||||
_pathRoute = new GameObject("MapPathRoute");
|
||||
_pathRoute.transform.parent = transform;
|
||||
var lineRender = _pathRoute.AddComponent<LineRenderer>();
|
||||
//lineRender.material = new Material(Shader.Find("Sprites/Default"));
|
||||
//var color7 = Resources.Load<Material>("UI/Material/color7");
|
||||
var Graph2 = Resources.Load<Material>("UI/Material/3dGraph2");
|
||||
lineRender.materials = new Material[] { Graph2 };
|
||||
//var Graph2 = Resources.Load<Material>("UI/Material/3dGraph2");
|
||||
lineRender.material = Graph2;//new Material[] { Graph2 };
|
||||
lineRender.endColor = new Color(0.9764706f, 0.1882353f, 0.5254902f, 0.65f);
|
||||
lineRender.startColor = new Color(0.9764706f, 0.1882353f, 0.5254902f, 0.65f);
|
||||
|
||||
@@ -233,11 +235,11 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
lineRender.endWidth = 1f;
|
||||
lineRender.positionCount = feat.Count;
|
||||
lineRender.SetPositions(feat.ToArray());
|
||||
lineRender.loop = false;
|
||||
lineRender.numCapVertices = 10;
|
||||
//lineRender.numCornerVertices = 10;
|
||||
//
|
||||
lineRender.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off;
|
||||
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;
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
using DG.Tweening;
|
||||
using Assets.Scenes.Ride.Scripts.Model;
|
||||
using UnityEngine.EventSystems;
|
||||
using Assets.Scripts;
|
||||
using Assets.Scripts.Apis;
|
||||
|
||||
namespace Assets.Scenes.Ride.Scripts
|
||||
{
|
||||
@@ -29,13 +31,17 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
if (mainController.routeResult != null)
|
||||
{
|
||||
#region 注释伴侣骑行的重骑和继续骑行的逻辑
|
||||
//if (mainController.routeResult.Mode == CyclingModel.Review.ToString())
|
||||
//{
|
||||
// mainController.SetCyclingModel(CyclingModel.Review);
|
||||
// selectPanel.SetActive(false);
|
||||
// var reviewFactory = reviewPanel.transform.GetComponent<ReviewFactory>();
|
||||
// reviewFactory.Refresh();
|
||||
//}
|
||||
if (mainController.routeResult.Mode == CyclingModel.Review.ToString())
|
||||
{
|
||||
mainController.SetCyclingModel(CyclingModel.Review);
|
||||
selectPanel.SetActive(false);
|
||||
//查询选中人员的骑行记录
|
||||
MapApi mapApi = new MapApi();
|
||||
var rankingList = mapApi.GetRecordFileFromServer(mainController.routeResult.ContinueCyclingParam.RankingsId);
|
||||
var reviewFactory = reviewPanel.transform.GetComponent<ReviewFactory>();
|
||||
reviewFactory.Refresh();
|
||||
reviewFactory.SetReview(rankingList);
|
||||
}
|
||||
#endregion
|
||||
if (mainController.routeResult.Mode == CyclingModel.Single.ToString())
|
||||
{
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace Assets.Scripts.UI.Control
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public bool showTooltip { get; set; }
|
||||
private void BindEvent()
|
||||
{
|
||||
//鼠标进入
|
||||
@@ -113,11 +113,14 @@ namespace Assets.Scripts.UI.Control
|
||||
#if !(UNITY_ANDROID || UNITY_IOS)
|
||||
if (!string.IsNullOrWhiteSpace(Tooltips))
|
||||
{
|
||||
#else
|
||||
if (!string.IsNullOrWhiteSpace(Tooltips) && showTooltip)
|
||||
{
|
||||
#endif
|
||||
tooltips.GetComponent<CanvasGroup>().alpha = 0f;
|
||||
tooltips.SetActive(true);
|
||||
tooltips.GetComponent<CanvasGroup>().DOFade(1f, 0.2f);
|
||||
}
|
||||
#endif
|
||||
switch (mType)
|
||||
{
|
||||
case Type.Normal:
|
||||
@@ -145,8 +148,13 @@ namespace Assets.Scripts.UI.Control
|
||||
UIManager.AddEvent(this.gameObject, EventTriggerType.PointerExit, new UnityAction<BaseEventData>(e =>
|
||||
{
|
||||
if (!this.isActiveAndEnabled) return;
|
||||
#if !(UNITY_ANDROID || UNITY_IOS)
|
||||
if (!string.IsNullOrWhiteSpace(Tooltips))
|
||||
{
|
||||
#else
|
||||
if (!string.IsNullOrWhiteSpace(Tooltips) && showTooltip)
|
||||
{
|
||||
#endif
|
||||
tooltips.SetActive(false);
|
||||
}
|
||||
//Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto);
|
||||
|
||||
@@ -72,8 +72,11 @@ public class ConnectDeviceModal : PFUIPanel
|
||||
this.Close();
|
||||
//DestroyImmediate(this.gameObject);
|
||||
}));
|
||||
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
deviceItem = Resources.Load("UI/Prefab/Device/Mobile/DeviceItem");
|
||||
#else
|
||||
deviceItem = Resources.Load("UI/Prefab/Device/DeviceItem");
|
||||
#endif
|
||||
|
||||
connectBtn = container.Find("ConnectBtn").GetComponent<PfUIButton>();
|
||||
connectBtnText = connectBtn.transform.Find("Text").GetComponent<Text>();
|
||||
|
||||
@@ -29,7 +29,8 @@ public class DeviceItem : Selectable, IEventSystemHandler, IPointerClickHandler
|
||||
protected override void Start()
|
||||
{
|
||||
//this.currentSelectionState = SelectionState.Selected
|
||||
|
||||
if (DeviceInfo == null)
|
||||
return;
|
||||
mText.text = DeviceInfo.Name;// + "-" + DeviceInfo.DeviceNumber;
|
||||
if(DeviceInfo.Network == NetworkType.ANT)
|
||||
{
|
||||
|
||||
@@ -58,6 +58,9 @@ public class DeviceView : MonoBehaviour
|
||||
/// </summary>
|
||||
private Sprite sprite3;
|
||||
|
||||
private Button unconnectionButton;
|
||||
private Button connectionButton;
|
||||
|
||||
private float timer = 1.0f;
|
||||
private void Awake()
|
||||
{
|
||||
@@ -67,9 +70,10 @@ public class DeviceView : MonoBehaviour
|
||||
mSearchButton = unconnectionPanel.transform.Find("SearchButton").gameObject;
|
||||
mPairButton = unconnectionPanel.transform.Find("PairButton").gameObject;
|
||||
searchState = unconnectionPanel.transform.Find("SearchState").GetComponent<Text>();
|
||||
unconnectionButton = unconnectionPanel.GetComponent<Button>();
|
||||
mPairButton.SetActive(false);
|
||||
connectionPanel = this.transform.Find("ConnectionPanel").gameObject;
|
||||
|
||||
connectionButton = connectionPanel.GetComponent<Button>();
|
||||
var material = Instantiate(Resources.Load<Material>("UI/Material/RoundedCornersTextureMaterial"));
|
||||
var rect = ((RectTransform)transform).rect;
|
||||
material.SetVector(Shader.PropertyToID("_WidthHeightRadius"), new Vector4(rect.width, rect.height, rect.height * 0.2f, 0));
|
||||
@@ -122,41 +126,68 @@ public class DeviceView : MonoBehaviour
|
||||
|
||||
connectionPanel.SetActive(false);
|
||||
|
||||
UIManager.AddEvent(mPairButton, EventTriggerType.PointerClick, new UnityAction<UnityEngine.EventSystems.BaseEventData>(e =>
|
||||
UIManager.AddEvent(unconnectionButton.gameObject, EventTriggerType.PointerClick, new UnityAction<UnityEngine.EventSystems.BaseEventData>(e =>
|
||||
{
|
||||
if (deviceModal == null)
|
||||
if (!mPairButton.activeSelf)
|
||||
{
|
||||
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
var obj = Resources.Load("UI/Prefab/Device/Mobile/ConnectDeviceModal");
|
||||
#else
|
||||
var obj = Resources.Load("UI/Prefab/Device/ConnectDeviceModal");
|
||||
#endif
|
||||
GameObject gameObject = (GameObject)Instantiate(obj);
|
||||
deviceModal = gameObject.GetComponent<ConnectDeviceModal>();
|
||||
return;
|
||||
}
|
||||
deviceModal.SensorType = this.SensorType;
|
||||
UIManager.Show(deviceModal, null, true);
|
||||
connectButtonClick();
|
||||
}));
|
||||
|
||||
|
||||
UIManager.AddEvent(mPairButton, EventTriggerType.PointerClick, new UnityAction<UnityEngine.EventSystems.BaseEventData>(e =>
|
||||
{
|
||||
connectButtonClick();
|
||||
}));
|
||||
|
||||
UIManager.AddEvent(connectionButton.gameObject, EventTriggerType.PointerClick, new UnityEngine.Events.UnityAction<BaseEventData>(e => {
|
||||
if (!connectionPanel.activeSelf)
|
||||
{
|
||||
return;
|
||||
}
|
||||
mDisconnectButtonClick();
|
||||
}));
|
||||
|
||||
|
||||
UIManager.AddEvent(mDisconnectButton, EventTriggerType.PointerClick, new UnityEngine.Events.UnityAction<BaseEventData>(e => {
|
||||
//var device = GetDevice();
|
||||
//if(device != null && device.State == DeviceState.Connected)
|
||||
//{
|
||||
// device.Disconnect();
|
||||
//}
|
||||
mDisconnectButtonClick();
|
||||
}));
|
||||
|
||||
}
|
||||
void connectButtonClick()
|
||||
{
|
||||
if (deviceModal == null)
|
||||
{
|
||||
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
var obj = Resources.Load("UI/Prefab/Device/Mobile/ConnectDeviceModal");
|
||||
#else
|
||||
var obj = Resources.Load("UI/Prefab/Device/ConnectDeviceModal");
|
||||
var obj = Resources.Load("UI/Prefab/Device/ConnectDeviceModal");
|
||||
#endif
|
||||
GameObject gameObject = (GameObject)Instantiate(obj);
|
||||
deviceModal = gameObject.GetComponent<ConnectDeviceModal>();
|
||||
deviceModal.SensorType = this.SensorType;
|
||||
UIManager.Show(deviceModal, null, true);
|
||||
}));
|
||||
}
|
||||
deviceModal.SensorType = this.SensorType;
|
||||
UIManager.Show(deviceModal, null, true);
|
||||
}
|
||||
void mDisconnectButtonClick()
|
||||
{
|
||||
//var device = GetDevice();
|
||||
//if(device != null && device.State == DeviceState.Connected)
|
||||
//{
|
||||
// device.Disconnect();
|
||||
//}
|
||||
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
var obj = Resources.Load("UI/Prefab/Device/Mobile/ConnectDeviceModal");
|
||||
#else
|
||||
var obj = Resources.Load("UI/Prefab/Device/ConnectDeviceModal");
|
||||
#endif
|
||||
GameObject gameObject = (GameObject)Instantiate(obj);
|
||||
deviceModal = gameObject.GetComponent<ConnectDeviceModal>();
|
||||
deviceModal.SensorType = this.SensorType;
|
||||
UIManager.Show(deviceModal, null, true);
|
||||
}
|
||||
|
||||
void InitLogo()
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using Assets.Scripts.UI.Control;
|
||||
using DG.Tweening;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
@@ -9,6 +11,7 @@ public class MainNav : MonoBehaviour
|
||||
{
|
||||
private GameObject exit;
|
||||
private GameObject home;
|
||||
float delayTime = 0;
|
||||
private void Awake()
|
||||
{
|
||||
//var material = Instantiate(Resources.Load<Material>("UI/Material/RoundedCornersTextureMaterial"));
|
||||
@@ -32,8 +35,15 @@ public class MainNav : MonoBehaviour
|
||||
|
||||
exit = this.transform.Find("Exit").gameObject;
|
||||
exit.SetActive(false);
|
||||
|
||||
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
UIManager.AddEvent(transform.Find("Delay").gameObject, EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
delayTime = 3;
|
||||
transform.Find("Delay/Tooltips").gameObject.SetActive(true);
|
||||
transform.Find("Delay/Tooltips").GetComponent<CanvasGroup>().DOFade(1, 0.5f);
|
||||
});
|
||||
#endif
|
||||
//transform.Find("Delay").GetComponent<PfUIButton>().showTooltip = true;
|
||||
UIManager.AddEvent(exit, EventTriggerType.PointerClick, (e) =>
|
||||
{
|
||||
UIManager.ShowConfirm("Quit", "Do you want to quit PowerFun?", ()=> {
|
||||
@@ -76,7 +86,20 @@ public class MainNav : MonoBehaviour
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
if (delayTime < 0)
|
||||
{
|
||||
Debug.Log("小时");
|
||||
delayTime = 0;
|
||||
transform.Find("Delay/Tooltips").GetComponent<CanvasGroup>().DOFade(0, 0.5f).onComplete = ()=>
|
||||
{
|
||||
transform.Find("Delay/Tooltips").gameObject.SetActive(false);
|
||||
};
|
||||
}
|
||||
else if(delayTime > 0)
|
||||
{
|
||||
Debug.Log(delayTime);
|
||||
delayTime -= Time.deltaTime;
|
||||
}
|
||||
}
|
||||
|
||||
public void ShowExit()
|
||||
|
||||
@@ -43,8 +43,13 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
||||
}
|
||||
float? localY = null;
|
||||
MapRoute map;
|
||||
public void Initial(MapRoute myMap)
|
||||
Dictionary<string, Texture> caches;
|
||||
public void Initial(MapRoute myMap, Dictionary<string, Texture> caches)
|
||||
{
|
||||
if (caches != null)
|
||||
{
|
||||
this.caches = caches;
|
||||
}
|
||||
map = myMap;
|
||||
//localY = transform.GetComponent<RectTransform>().rect.height;
|
||||
//Debug.Log(localY);
|
||||
@@ -122,8 +127,8 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
||||
transform.Find("BtnInfo").GetComponent<Button>().onClick.AddListener(Info);
|
||||
transform.Find("BtnRide").GetComponent<Button>().onClick.AddListener(Ride);
|
||||
|
||||
Utils.DisplayImage(transform.Find("MapTitleImg").GetComponent<RawImage>(), myMap.CoverImage, true);
|
||||
Utils.DisplayImage(transform.Find("MapHBImg").GetComponent<RawImage>(), myMap.AltitudeGraph, true);
|
||||
Utils.DisplayImageTempDict(transform.Find("MapTitleImg").GetComponent<RawImage>(), myMap.CoverImage, this.caches);
|
||||
Utils.DisplayImageTempDict(transform.Find("MapHBImg").GetComponent<RawImage>(), myMap.AltitudeGraph, this.caches);
|
||||
|
||||
SetActive4Button(false);
|
||||
}
|
||||
@@ -140,6 +145,11 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
||||
App.MainSceneParam["Name"] = "MapListPanel";
|
||||
}
|
||||
SceneManager.LoadScene("Ride");
|
||||
//foreach (var item in Utils.propTextureCache)
|
||||
//{
|
||||
// DestroyImmediate(item.Value);
|
||||
//}
|
||||
//Utils.propTextureCache.Clear();
|
||||
}
|
||||
|
||||
private void Info()
|
||||
@@ -257,7 +267,7 @@ public class MapItem : MonoBehaviour, IPointerExitHandler, IPointerEnterHandler,
|
||||
AltitudeGraph = model.AltitudeGraph,
|
||||
Distance = model.Distance,
|
||||
IsFavorite = model.IsFavorite,
|
||||
});
|
||||
},null);
|
||||
}
|
||||
|
||||
public void Move(Vector3 position)
|
||||
|
||||
@@ -21,7 +21,11 @@ public class MapListController : PFUIPanel
|
||||
[SerializeField] GameObject content;
|
||||
[SerializeField] GameObject scroll;
|
||||
[HideInInspector] public int pageIndex = 0;
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
[HideInInspector] public int pageSize = 21;
|
||||
#else
|
||||
[HideInInspector] public int pageSize = 20;
|
||||
#endif
|
||||
[HideInInspector] public string hard = "全部";
|
||||
private Transform distanceOptions;
|
||||
private Transform diffOptions;
|
||||
@@ -262,6 +266,7 @@ public class MapListController : PFUIPanel
|
||||
});
|
||||
//sortDir.GetComponent<Button>().onClick.AddListener();
|
||||
}
|
||||
caches = new Dictionary<string, Texture>();
|
||||
}
|
||||
void onEndEdit()
|
||||
{
|
||||
@@ -354,6 +359,7 @@ public class MapListController : PFUIPanel
|
||||
}
|
||||
|
||||
}
|
||||
Dictionary<string, Texture> caches = null;
|
||||
void DisplayMaps(List<MapRoute> list)
|
||||
{
|
||||
if (map != null)
|
||||
@@ -361,7 +367,7 @@ public class MapListController : PFUIPanel
|
||||
foreach (var item in list)
|
||||
{
|
||||
var obj = Instantiate(map);
|
||||
obj.GetComponent<MapItem>().Initial(item);
|
||||
obj.GetComponent<MapItem>().Initial(item, caches);
|
||||
//obj.SendMessage("Initial", );
|
||||
obj.transform.SetParent(content.transform);
|
||||
obj.transform.localScale = new Vector3(1, 1, 1);
|
||||
@@ -468,4 +474,12 @@ public class MapListController : PFUIPanel
|
||||
ResetPanel();
|
||||
transform.MyDOFade();
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
caches = null;
|
||||
Resources.UnloadUnusedAssets();
|
||||
GC.Collect();
|
||||
Debug.Log("list empty");
|
||||
}
|
||||
}
|
||||
@@ -40,6 +40,10 @@ public class RaceItemScript : MonoBehaviour, IPointerExitHandler, IPointerEnterH
|
||||
}
|
||||
public void Initial(MapCompetition mapCompetition,Transform parent,string from = "list")
|
||||
{
|
||||
if (parent != null)
|
||||
{
|
||||
this.parent = parent;
|
||||
}
|
||||
transform.GetComponent<Button>().onClick.RemoveAllListeners();
|
||||
#if !(UNITY_ANDROID || UNITY_IOS)
|
||||
transform.GetComponent<Button>().onClick.AddListener(() =>
|
||||
@@ -48,7 +52,7 @@ public class RaceItemScript : MonoBehaviour, IPointerExitHandler, IPointerEnterH
|
||||
App.CompetionId = mapCompetition.Id;
|
||||
SceneManager.LoadScene("Ride");
|
||||
});
|
||||
Utils.DisplayImage(transform.GetComponent<RawImage>(), mapCompetition.RouteCover, true);
|
||||
Utils.DisplayImageTempDict(transform.GetComponent<RawImage>(), mapCompetition.RouteCover, this.parent.GetComponent<RaceScript>().caches);
|
||||
#else
|
||||
if (string.IsNullOrEmpty(_from))
|
||||
{
|
||||
@@ -56,14 +60,14 @@ public class RaceItemScript : MonoBehaviour, IPointerExitHandler, IPointerEnterH
|
||||
}
|
||||
if (_from == "list")
|
||||
{
|
||||
Utils.DisplayImage(transform.GetComponent<RawImage>(), mapCompetition.RouteCover, true);
|
||||
Utils.DisplayImageTempDict(transform.GetComponent<RawImage>(), mapCompetition.RouteCover, this.parent.GetComponent<RaceScript>().caches);
|
||||
transform.GetComponent<Button>().onClick.AddListener(() =>
|
||||
{
|
||||
UIManager.ShowRaceDetailModal(transform,mapCompetition);
|
||||
});
|
||||
}
|
||||
#endif
|
||||
Utils.DisplayImage(transform.Find("AltitudeCurve").GetComponent<RawImage>(), mapCompetition.AltitudeGraph, true);
|
||||
Utils.DisplayImageTempDict(transform.Find("AltitudeCurve").GetComponent<RawImage>(), mapCompetition.AltitudeGraph, this.parent.GetComponent<RaceScript>().caches);
|
||||
transform.Find("InfoContainer/Text").GetComponent<Text>().SetTextWithEllipsis(mapCompetition.Title);
|
||||
transform.Find("GetReadyContainer").gameObject.SetActive(mapCompetition.Status != 4);
|
||||
transform.Find("GetReadyContainer-2").gameObject.SetActive(mapCompetition.Status == 1);
|
||||
@@ -91,10 +95,7 @@ public class RaceItemScript : MonoBehaviour, IPointerExitHandler, IPointerEnterH
|
||||
SetButtonGroup(mapCompetition);
|
||||
}
|
||||
#endif
|
||||
if (parent != null)
|
||||
{
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
this.mapCompetition = mapCompetition;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Assets.Scripts;
|
||||
using DG.Tweening;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
@@ -10,6 +11,8 @@ public class RaceScript : PFUIPanel
|
||||
// Start is called before the first frame update
|
||||
protected Transform currentItem { get; set; }
|
||||
IEnumerator _timer { get; set; }
|
||||
public Dictionary<string, Texture> caches { get; set; }
|
||||
|
||||
public override void Show()
|
||||
{
|
||||
base.Show();
|
||||
@@ -71,7 +74,6 @@ public class RaceScript : PFUIPanel
|
||||
while (true)
|
||||
{
|
||||
yield return new WaitForSeconds(1.0f); //
|
||||
Debug.Log(123);
|
||||
HandleTime();
|
||||
//time = UIManager.Now.GetDateTime().AddSeconds(1);
|
||||
}
|
||||
@@ -138,8 +140,10 @@ public class RaceScript : PFUIPanel
|
||||
}
|
||||
}
|
||||
|
||||
void Awake()
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
caches = new Dictionary<string, Texture>();
|
||||
if (_timer == null)
|
||||
{
|
||||
_timer = Timer();
|
||||
@@ -151,4 +155,12 @@ public class RaceScript : PFUIPanel
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
caches = null;
|
||||
Resources.UnloadUnusedAssets();
|
||||
GC.Collect();
|
||||
Debug.Log("list empty");
|
||||
}
|
||||
}
|
||||
@@ -37,6 +37,7 @@ public class ResultListController : PFUIPanel
|
||||
{
|
||||
//ApiBase.SetCookie("73385F5F719B610D132C1ECF3E9143272BF15214D57ED91CD7A9DFD832407471535112AAEB8E9271F75D54FBBF2D99F18FA313C1EEA5676F5D722D7FBB07C926BEC5905591BF9AFDDC6336552DF273112C2DA1794E6FA2F465B11FECD2E82E52");
|
||||
localRouteItem = Resources.Load<Transform>("UI/Prefab/ResultList/LocalRouteItem");
|
||||
caches = new Dictionary<string, Texture>();
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
routeResult = Resources.Load<Transform>("UI/Prefab/ResultList/RouteItem-Mobile");
|
||||
localRouteItem = Resources.Load<Transform>("UI/Prefab/ResultList/LocalRouteItem-Mobile");
|
||||
@@ -231,6 +232,8 @@ public class ResultListController : PFUIPanel
|
||||
Utils.showToast(gameObject, r.errMsg);
|
||||
}
|
||||
}
|
||||
[HideInInspector]
|
||||
public Dictionary<string, Texture> caches = null;
|
||||
void DisplayRouteResult(List<JObject> list,Transform content,int index)
|
||||
{
|
||||
if (routeResult != null)
|
||||
@@ -353,4 +356,11 @@ public class ResultListController : PFUIPanel
|
||||
//}
|
||||
|
||||
}
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
caches = null;
|
||||
Resources.UnloadUnusedAssets();
|
||||
GC.Collect();
|
||||
Debug.Log("list empty");
|
||||
}
|
||||
}
|
||||
@@ -130,8 +130,9 @@ public class RouteItem : MonoBehaviour
|
||||
public void Initial(RouteResult result,int index,Transform parent = null)
|
||||
{
|
||||
routeResult = result;
|
||||
|
||||
Utils.DisplayImage(transform.Find("BigLeft/CoverImage").GetComponent<RawImage>(), result.RouteImage, true);
|
||||
Utils.DisplayImageTempDict(transform.Find("BigLeft/CoverImage").GetComponent<RawImage>(), result.RouteImage,
|
||||
parent.GetComponent<ResultListController>().caches);
|
||||
//Utils.DisplayImage(transform.Find("BigLeft/CoverImage").GetComponent<RawImage>(), result.RouteImage, true);
|
||||
|
||||
left.Find("Main").Find("Name").GetComponent<Text>().text = result.RouteName;
|
||||
left.Find("Main").Find("Time").GetComponent<Text>().text = result.CreateTime.ToString("HH:mm:ss dd-MM-yyyy");
|
||||
@@ -249,8 +250,8 @@ public class RouteItem : MonoBehaviour
|
||||
UIManager.ShowConfirm("ReRide", "Ride again?", () =>
|
||||
{
|
||||
App.RouteIdParam = routeResult.RouteId;
|
||||
App.routeResult = routeResult;
|
||||
App.routeResult.ContinueCyclingParam = null;
|
||||
App.routeResult = null;//routeResult;
|
||||
//App.routeResult.ContinueCyclingParam = null;
|
||||
RecordFromUrl();
|
||||
SceneManager.LoadScene("Ride");
|
||||
});
|
||||
|
||||
@@ -15,6 +15,7 @@ using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using Assets.Scenes.Ride.Scripts;
|
||||
using UnityEngine.SceneManagement;
|
||||
using System.Threading;
|
||||
|
||||
public class UIManager : MonoBehaviour
|
||||
{
|
||||
@@ -53,7 +54,21 @@ public class UIManager : MonoBehaviour
|
||||
return this.GetPanelInstance("HomePanel", ref this.mHomePanel);
|
||||
}
|
||||
}
|
||||
|
||||
public static void RunOnUnityThread(Action action)
|
||||
{
|
||||
// is this right?
|
||||
if (unityThread == Thread.CurrentThread.ManagedThreadId)
|
||||
{
|
||||
action();
|
||||
}
|
||||
else
|
||||
{
|
||||
lock (runInUpdate)
|
||||
{
|
||||
runInUpdate.Enqueue(action);
|
||||
}
|
||||
}
|
||||
}
|
||||
private UserInfoController mUserInfoPanel;
|
||||
public UserInfoController UserInfoPanel
|
||||
{
|
||||
@@ -362,9 +377,12 @@ public class UIManager : MonoBehaviour
|
||||
stack.Clear();
|
||||
stack.Push(UIManager.Instance.HomePanel);
|
||||
}
|
||||
public static int unityThread;
|
||||
static public Queue<Action> runInUpdate = new Queue<Action>();
|
||||
private void Awake()
|
||||
{
|
||||
UIManager.Instance = this;
|
||||
unityThread = Thread.CurrentThread.ManagedThreadId;
|
||||
stack = new Stack<PFUIPanel>();
|
||||
loginRegOptions = new LoginRegOptions();
|
||||
var userInfosJson = PlayerPrefs.GetString("UserInfos");
|
||||
@@ -422,7 +440,16 @@ public class UIManager : MonoBehaviour
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
while (runInUpdate.Count > 0)
|
||||
{
|
||||
Action action = null;
|
||||
lock (runInUpdate)
|
||||
{
|
||||
if (runInUpdate.Count > 0)
|
||||
action = runInUpdate.Dequeue();
|
||||
}
|
||||
action?.Invoke();
|
||||
}
|
||||
}
|
||||
//重新查询已经参赛列表
|
||||
public static void UpdateJoinCompetition()
|
||||
@@ -1045,6 +1072,8 @@ public class UIManager : MonoBehaviour
|
||||
private void OnDestroy()
|
||||
{
|
||||
UIManager.Instance = null;
|
||||
Resources.UnloadUnusedAssets();
|
||||
GC.Collect();
|
||||
}
|
||||
public static void SwitchAccount()
|
||||
{
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
|
||||
|
||||
public class UnityMainThreadDispatcher : MonoBehaviour
|
||||
{
|
||||
|
||||
private static readonly Queue<Action> _executionQueue = new Queue<Action>();
|
||||
|
||||
/// <summary>
|
||||
/// Locks the queue and adds the IEnumerator to the queue
|
||||
/// </summary>
|
||||
/// <param name="action">IEnumerator function that will be executed from the main thread.</param>
|
||||
public void Enqueue(IEnumerator action)
|
||||
{
|
||||
lock (_executionQueue)
|
||||
{
|
||||
_executionQueue.Enqueue(() => {
|
||||
StartCoroutine(action);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Locks the queue and adds the Action to the queue
|
||||
/// </summary>
|
||||
/// <param name="action">function that will be executed from the main thread.</param>
|
||||
public void Enqueue(Action action)
|
||||
{
|
||||
Enqueue(ActionWrapper(action));
|
||||
}
|
||||
IEnumerator ActionWrapper(Action a)
|
||||
{
|
||||
a();
|
||||
yield return null;
|
||||
}
|
||||
|
||||
|
||||
private static UnityMainThreadDispatcher _instance = null;
|
||||
|
||||
public static bool Exists()
|
||||
{
|
||||
return _instance != null;
|
||||
}
|
||||
|
||||
public static UnityMainThreadDispatcher Instance()
|
||||
{
|
||||
if (!Exists())
|
||||
{
|
||||
throw new Exception("UnityMainThreadDispatcher could not find the UnityMainThreadDispatcher object. Please ensure you have added the MainThreadExecutor Prefab to your scene.");
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
|
||||
void Awake()
|
||||
{
|
||||
if (_instance == null)
|
||||
{
|
||||
_instance = this;
|
||||
DontDestroyOnLoad(this.gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
lock (_executionQueue)
|
||||
{
|
||||
while (_executionQueue.Count > 0)
|
||||
{
|
||||
_executionQueue.Dequeue().Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//void OnDestroy()
|
||||
//{
|
||||
// Debug.Log(79 + "清掉dispatch");
|
||||
// _instance = null;
|
||||
//}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 701a01d99aaa00c48a78af9bae9c2eda
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+103
-12
@@ -307,9 +307,9 @@ namespace Assets.Scripts
|
||||
/*删除父亲节点下的所有孩子*/
|
||||
|
||||
/*显示网络图片*/
|
||||
private static Dictionary<string, Texture> propTextureCache = new Dictionary<string, Texture>();
|
||||
public static Dictionary<string, Texture> propTextureCache = new Dictionary<string, Texture>();
|
||||
public delegate Coroutine StartCoroutine(IEnumerator routine);
|
||||
public static void DisplayImage(RawImage img, string url, bool cache = false)
|
||||
public static void DisplayImage(RawImage img, string url, bool cache = false,Dictionary<string,Texture> caches = null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(url))
|
||||
return;
|
||||
@@ -338,6 +338,32 @@ namespace Assets.Scripts
|
||||
}
|
||||
}));
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 使用临时字典存放图片,切换页面后清除
|
||||
/// </summary>
|
||||
/// <param name="img"></param>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="caches"></param>
|
||||
public static void DisplayImageTempDict(RawImage img, string url, Dictionary<string, Texture> caches = null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(url))
|
||||
return;
|
||||
if (caches!=null)
|
||||
{
|
||||
if (caches.ContainsKey(url))
|
||||
{
|
||||
img.texture = caches[url];
|
||||
return;
|
||||
}
|
||||
}
|
||||
UIManager.Instance.StartCoroutine(DownloadImage(img, url, (texture) => {
|
||||
if (caches != null && !caches.ContainsKey(url))
|
||||
{
|
||||
caches.Add(url, texture);
|
||||
}
|
||||
}));
|
||||
|
||||
}
|
||||
|
||||
public static void DisplayImageAysnc(StartCoroutine startCoroutine, RawImage img, string url,Action<string> action)
|
||||
@@ -349,34 +375,53 @@ namespace Assets.Scripts
|
||||
|
||||
static IEnumerator DownloadImage(RawImage img,string MediaUrl, Action<Texture> action = null)
|
||||
{
|
||||
UnityWebRequest request = UnityWebRequestTexture.GetTexture(MediaUrl);
|
||||
UnityWebRequest request = UnityWebRequest.Get(MediaUrl);
|
||||
yield return request.SendWebRequest();
|
||||
if (request.isNetworkError || request.isHttpError)
|
||||
Debug.Log(request.error);
|
||||
else if(img!=null)
|
||||
else if (img != null)
|
||||
{
|
||||
img.texture = ((DownloadHandlerTexture)request.downloadHandler).texture;
|
||||
if (action != null)
|
||||
var data = request.downloadHandler.data;
|
||||
img.texture = Utils.GetDownloadTexture(MediaUrl, data);
|
||||
if (action != null)
|
||||
{
|
||||
action.Invoke(img.texture);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static Texture GetDownloadTexture(string MediaUrl, byte[] data)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
var _t = new Texture2D(4, 4, TextureFormat.DXT5, false);
|
||||
#else
|
||||
#if UNITY_IOS
|
||||
var _t = new Texture2D(4, 4, TextureFormat.ASTC_RGB_4x4,false);
|
||||
Debug.Log("使用了壓縮");
|
||||
#elif UNITY_ANDROID
|
||||
var _t = new Texture2D(4, 4, TextureFormat.ASTC_RGB_4x4,false);
|
||||
Debug.Log("使用了壓縮");
|
||||
#else //pc
|
||||
var _t = new Texture2D(4, 4, TextureFormat.DXT5,false);
|
||||
#endif
|
||||
#endif
|
||||
_t.LoadImage(data,true);
|
||||
_t.name = MediaUrl;
|
||||
return _t;
|
||||
}
|
||||
static IEnumerator DownloadImageCallBack(RawImage img, string MediaUrl,Action<string> action)
|
||||
{
|
||||
UnityWebRequest request = UnityWebRequestTexture.GetTexture(MediaUrl);
|
||||
UnityWebRequest request = UnityWebRequest.Get(MediaUrl);
|
||||
yield return request.SendWebRequest();
|
||||
if (request.isNetworkError || request.isHttpError)
|
||||
Debug.Log(request.error);
|
||||
else
|
||||
{
|
||||
img.texture = ((DownloadHandlerTexture)request.downloadHandler).texture;
|
||||
var data = request.downloadHandler.data;
|
||||
img.texture = Utils.GetDownloadTexture(MediaUrl, data);
|
||||
action.Invoke(MediaUrl);
|
||||
}
|
||||
}
|
||||
/*显示网络图片*/
|
||||
|
||||
/*获取最顶层对象*/
|
||||
public static Transform FindUpParent(Transform zi)
|
||||
{
|
||||
@@ -408,8 +453,11 @@ namespace Assets.Scripts
|
||||
{
|
||||
// convert it to byte array
|
||||
byte[] texByte = System.Convert.FromBase64String(base64Tex);
|
||||
Texture2D tex = new Texture2D(2, 2);
|
||||
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
Texture2D tex = new Texture2D(4, 4, TextureFormat.ASTC_RGB_4x4,false);
|
||||
#else
|
||||
Texture2D tex = new Texture2D(4, 4, TextureFormat.DXT5,false);
|
||||
#endif
|
||||
//load texture from byte array
|
||||
if (tex.LoadImage(texByte))
|
||||
{
|
||||
@@ -603,5 +651,48 @@ namespace Assets.Scripts
|
||||
#endif
|
||||
}
|
||||
}
|
||||
public static IEnumerator StartLocation(Action<LocationInfo> action = null)
|
||||
{
|
||||
// Check if the user has location service enabled.
|
||||
if (!Input.location.isEnabledByUser)
|
||||
yield break;
|
||||
|
||||
// Starts the location service.
|
||||
Input.location.Start();
|
||||
|
||||
// Waits until the location service initializes
|
||||
int maxWait = 20;
|
||||
while (Input.location.status == LocationServiceStatus.Initializing && maxWait > 0)
|
||||
{
|
||||
yield return new WaitForSeconds(1);
|
||||
maxWait--;
|
||||
}
|
||||
|
||||
// If the service didn't initialize in 20 seconds this cancels location service use.
|
||||
if (maxWait < 1)
|
||||
{
|
||||
Debug.Log("Timed out");
|
||||
yield break;
|
||||
}
|
||||
|
||||
// If the connection failed this cancels location service use.
|
||||
if (Input.location.status == LocationServiceStatus.Failed)
|
||||
{
|
||||
Debug.Log("Unable to determine device location");
|
||||
yield break;
|
||||
}
|
||||
else
|
||||
{
|
||||
// If the connection succeeded, this retrieves the device's current location and displays it in the Console window.
|
||||
Debug.Log("Location: " + Input.location.lastData.latitude + " " + Input.location.lastData.longitude + " " + Input.location.lastData.altitude + " " + Input.location.lastData.horizontalAccuracy + " " + Input.location.lastData.timestamp);
|
||||
if (action != null)
|
||||
{
|
||||
action.Invoke(Input.location.lastData);
|
||||
}
|
||||
}
|
||||
|
||||
// Stops the location service if there is no need to query location updates continuously.
|
||||
Input.location.Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@
|
||||
"com.unity.collab-proxy": "1.2.16",
|
||||
"com.unity.ide.rider": "1.1.4",
|
||||
"com.unity.ide.vscode": "1.2.3",
|
||||
"com.unity.performance.profile-analyzer": "1.1.1",
|
||||
"com.unity.test-framework": "1.1.22",
|
||||
"com.unity.timeline": "1.2.18",
|
||||
"com.unity.ugui": "1.0.0",
|
||||
|
||||
@@ -50,6 +50,13 @@
|
||||
"dependencies": {},
|
||||
"url": "https://packages.unity.cn"
|
||||
},
|
||||
"com.unity.performance.profile-analyzer": {
|
||||
"version": "1.1.1",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {},
|
||||
"url": "https://packages.unity.cn"
|
||||
},
|
||||
"com.unity.test-framework": {
|
||||
"version": "1.1.22",
|
||||
"depth": 0,
|
||||
|
||||
@@ -133,7 +133,7 @@ PlayerSettings:
|
||||
16:10: 1
|
||||
16:9: 1
|
||||
Others: 1
|
||||
bundleVersion: 2.0.5
|
||||
bundleVersion: 2.0.7
|
||||
preloadedAssets: []
|
||||
metroInputSource: 0
|
||||
wsaTransparentSwapchain: 0
|
||||
@@ -179,8 +179,8 @@ PlayerSettings:
|
||||
applicationIdentifier:
|
||||
Android: com.ZhiXingPai.PowerFunUnity
|
||||
buildNumber:
|
||||
iPhone: 2.0.5.0
|
||||
AndroidBundleVersionCode: 7
|
||||
iPhone: 2.0.7.0
|
||||
AndroidBundleVersionCode: 9
|
||||
AndroidMinSdkVersion: 24
|
||||
AndroidTargetSdkVersion: 30
|
||||
AndroidPreferredInstallLocation: 1
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
QualitySettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 5
|
||||
m_CurrentQuality: 5
|
||||
m_CurrentQuality: 2
|
||||
m_QualitySettings:
|
||||
- serializedVersion: 2
|
||||
name: Very Low
|
||||
@@ -18,7 +18,7 @@ QualitySettings:
|
||||
shadowCascade2Split: 0.33333334
|
||||
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
|
||||
shadowmaskMode: 0
|
||||
blendWeights: 1
|
||||
skinWeights: 1
|
||||
textureQuality: 1
|
||||
anisotropicTextures: 0
|
||||
antiAliasing: 0
|
||||
@@ -40,6 +40,7 @@ QualitySettings:
|
||||
asyncUploadBufferSize: 16
|
||||
asyncUploadPersistentBuffer: 1
|
||||
resolutionScalingFixedDPIFactor: 1
|
||||
customRenderPipeline: {fileID: 0}
|
||||
excludedTargetPlatforms: []
|
||||
- serializedVersion: 2
|
||||
name: Low
|
||||
@@ -53,7 +54,7 @@ QualitySettings:
|
||||
shadowCascade2Split: 0.33333334
|
||||
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
|
||||
shadowmaskMode: 0
|
||||
blendWeights: 2
|
||||
skinWeights: 2
|
||||
textureQuality: 0
|
||||
anisotropicTextures: 0
|
||||
antiAliasing: 0
|
||||
@@ -75,6 +76,7 @@ QualitySettings:
|
||||
asyncUploadBufferSize: 16
|
||||
asyncUploadPersistentBuffer: 1
|
||||
resolutionScalingFixedDPIFactor: 1
|
||||
customRenderPipeline: {fileID: 0}
|
||||
excludedTargetPlatforms: []
|
||||
- serializedVersion: 2
|
||||
name: Medium
|
||||
@@ -88,7 +90,7 @@ QualitySettings:
|
||||
shadowCascade2Split: 0.33333334
|
||||
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
|
||||
shadowmaskMode: 0
|
||||
blendWeights: 2
|
||||
skinWeights: 2
|
||||
textureQuality: 0
|
||||
anisotropicTextures: 1
|
||||
antiAliasing: 0
|
||||
@@ -99,7 +101,7 @@ QualitySettings:
|
||||
vSyncCount: 1
|
||||
lodBias: 0.7
|
||||
maximumLODLevel: 0
|
||||
streamingMipmapsActive: 0
|
||||
streamingMipmapsActive: 1
|
||||
streamingMipmapsAddAllCameras: 1
|
||||
streamingMipmapsMemoryBudget: 512
|
||||
streamingMipmapsRenderersPerFrame: 512
|
||||
@@ -110,6 +112,7 @@ QualitySettings:
|
||||
asyncUploadBufferSize: 16
|
||||
asyncUploadPersistentBuffer: 1
|
||||
resolutionScalingFixedDPIFactor: 1
|
||||
customRenderPipeline: {fileID: 0}
|
||||
excludedTargetPlatforms: []
|
||||
- serializedVersion: 2
|
||||
name: High
|
||||
@@ -123,7 +126,7 @@ QualitySettings:
|
||||
shadowCascade2Split: 0.33333334
|
||||
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
|
||||
shadowmaskMode: 1
|
||||
blendWeights: 2
|
||||
skinWeights: 2
|
||||
textureQuality: 0
|
||||
anisotropicTextures: 1
|
||||
antiAliasing: 0
|
||||
@@ -145,6 +148,7 @@ QualitySettings:
|
||||
asyncUploadBufferSize: 16
|
||||
asyncUploadPersistentBuffer: 1
|
||||
resolutionScalingFixedDPIFactor: 1
|
||||
customRenderPipeline: {fileID: 0}
|
||||
excludedTargetPlatforms: []
|
||||
- serializedVersion: 2
|
||||
name: Very High
|
||||
@@ -158,7 +162,7 @@ QualitySettings:
|
||||
shadowCascade2Split: 0.33333334
|
||||
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
|
||||
shadowmaskMode: 1
|
||||
blendWeights: 4
|
||||
skinWeights: 4
|
||||
textureQuality: 0
|
||||
anisotropicTextures: 2
|
||||
antiAliasing: 2
|
||||
@@ -180,6 +184,7 @@ QualitySettings:
|
||||
asyncUploadBufferSize: 16
|
||||
asyncUploadPersistentBuffer: 1
|
||||
resolutionScalingFixedDPIFactor: 1
|
||||
customRenderPipeline: {fileID: 0}
|
||||
excludedTargetPlatforms: []
|
||||
- serializedVersion: 2
|
||||
name: Ultra
|
||||
@@ -193,7 +198,7 @@ QualitySettings:
|
||||
shadowCascade2Split: 0.33333334
|
||||
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
|
||||
shadowmaskMode: 1
|
||||
blendWeights: 4
|
||||
skinWeights: 4
|
||||
textureQuality: 0
|
||||
anisotropicTextures: 2
|
||||
antiAliasing: 2
|
||||
@@ -215,6 +220,7 @@ QualitySettings:
|
||||
asyncUploadBufferSize: 16
|
||||
asyncUploadPersistentBuffer: 1
|
||||
resolutionScalingFixedDPIFactor: 1
|
||||
customRenderPipeline: {fileID: 0}
|
||||
excludedTargetPlatforms: []
|
||||
m_PerPlatformDefaultQuality:
|
||||
Android: 2
|
||||
|
||||
Reference in new issue
Block a user