一波小改动
This commit is contained in:
parent
c5500c269f
commit
333c99fb46
@ -118,7 +118,7 @@ public class GUIMainNetWorkInfo : MonoBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
labelBattery.text = "No Net";
|
||||
labelBattery.text = App.GetLocalString("No Net");
|
||||
}
|
||||
labelBattery.color = Utils.HexToColorHtml(getColor(_delayTime));
|
||||
}
|
||||
|
||||
43
Assets/HomeMessageController.cs
Normal file
43
Assets/HomeMessageController.cs
Normal file
@ -0,0 +1,43 @@
|
||||
using DG.Tweening;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class HomeMessageController : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
float startX;
|
||||
private void Awake()
|
||||
{
|
||||
startX = transform.Find("TextContainer/Content").localPosition.x;
|
||||
}
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
float timer = 2;
|
||||
public float? textWidth = null;
|
||||
[HideInInspector]public bool isAnimated = false;
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
timer -= Time.deltaTime;
|
||||
if (timer <= 0)
|
||||
{
|
||||
//do
|
||||
if (textWidth.HasValue && textWidth > 180 && !isAnimated)
|
||||
{
|
||||
isAnimated = true;
|
||||
var offset = textWidth.Value - 180;
|
||||
var game = transform.Find("TextContainer/Content");
|
||||
game.DOLocalMoveX(startX - offset, 0.5f).onComplete
|
||||
= () => Invoke("returnAni", 1.5f);
|
||||
}
|
||||
timer += 4;
|
||||
}
|
||||
}
|
||||
void returnAni()
|
||||
{
|
||||
transform.Find("TextContainer/Content").DOLocalMoveX(startX, 0.5f);
|
||||
}
|
||||
}
|
||||
11
Assets/HomeMessageController.cs.meta
Normal file
11
Assets/HomeMessageController.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f6247a8eb0fd999408f36609f20d1efb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,5 +1,94 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1443535058899255606
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4467515848031294650}
|
||||
- component: {fileID: 4121213239856402810}
|
||||
- component: {fileID: 474201849153503485}
|
||||
- component: {fileID: 8092863628190855973}
|
||||
m_Layer: 5
|
||||
m_Name: TextContainer
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4467515848031294650
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1443535058899255606}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 7479474444580396582}
|
||||
m_Father: {fileID: 3342506722007875057}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 9, y: -24}
|
||||
m_SizeDelta: {x: -62, y: 14}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
--- !u!222 &4121213239856402810
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1443535058899255606}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &474201849153503485
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1443535058899255606}
|
||||
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.003921569}
|
||||
m_RaycastTarget: 1
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &8092863628190855973
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1443535058899255606}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 31a19414c41e5ae4aae2af33fee712f6, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_ShowMaskGraphic: 1
|
||||
--- !u!1 &3342506722007875022
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -14,6 +103,7 @@ GameObject:
|
||||
- component: {fileID: 3342506722007875058}
|
||||
- component: {fileID: 3342506722007875061}
|
||||
- component: {fileID: 2719744276993684539}
|
||||
- component: {fileID: 599073189053357809}
|
||||
m_Layer: 5
|
||||
m_Name: Message
|
||||
m_TagString: Untagged
|
||||
@ -34,7 +124,7 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 3342506723879539844}
|
||||
- {fileID: 3342506723743580662}
|
||||
- {fileID: 3342506722835179386}
|
||||
- {fileID: 4467515848031294650}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@ -159,84 +249,19 @@ MonoBehaviour:
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!1 &3342506722835179387
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3342506722835179386}
|
||||
- component: {fileID: 3342506722835179388}
|
||||
- component: {fileID: 3342506722835179389}
|
||||
m_Layer: 5
|
||||
m_Name: Content
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &3342506722835179386
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3342506722835179387}
|
||||
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: 3342506722007875057}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 9, y: -24}
|
||||
m_SizeDelta: {x: -62, y: 14}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
--- !u!222 &3342506722835179388
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3342506722835179387}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &3342506722835179389
|
||||
--- !u!114 &599073189053357809
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3342506722835179387}
|
||||
m_GameObject: {fileID: 3342506722007875022}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Script: {fileID: 11500000, guid: f6247a8eb0fd999408f36609f20d1efb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 1db9e217733971041be26b076fda6083, type: 3}
|
||||
m_FontSize: 12
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 1
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 0
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: won the title of <color=#a374fe>Climbing King</color>
|
||||
isAnimated: 0
|
||||
--- !u!1 &3342506723743580663
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -400,3 +425,96 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
radius: 13
|
||||
--- !u!1 &3344391905181573295
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7479474444580396582}
|
||||
- component: {fileID: 8974745493057366815}
|
||||
- component: {fileID: 4864779298271313415}
|
||||
- component: {fileID: 6425750467678872104}
|
||||
m_Layer: 5
|
||||
m_Name: Content
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7479474444580396582
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3344391905181573295}
|
||||
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: 4467515848031294650}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0.5}
|
||||
m_AnchorMax: {x: 0, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 6}
|
||||
m_SizeDelta: {x: 0, y: 14}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!222 &8974745493057366815
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3344391905181573295}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &4864779298271313415
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3344391905181573295}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 1db9e217733971041be26b076fda6083, type: 3}
|
||||
m_FontSize: 10
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 1
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 0
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: won the title of <color=#a374fe>Climbing King</color>
|
||||
--- !u!114 &6425750467678872104
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3344391905181573295}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalFit: 2
|
||||
m_VerticalFit: 0
|
||||
|
||||
@ -15,6 +15,7 @@ GameObject:
|
||||
- component: {fileID: 3342506722007875061}
|
||||
- component: {fileID: 965343107992592655}
|
||||
- component: {fileID: 5707290391294119461}
|
||||
- component: {fileID: 4655441992065632048}
|
||||
m_Layer: 5
|
||||
m_Name: Message
|
||||
m_TagString: Untagged
|
||||
@ -35,7 +36,7 @@ RectTransform:
|
||||
m_Children:
|
||||
- {fileID: 3342506723879539844}
|
||||
- {fileID: 3342506723743580662}
|
||||
- {fileID: 3342506722835179386}
|
||||
- {fileID: 6637477610276793240}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@ -125,7 +126,7 @@ CanvasGroup:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3342506722007875022}
|
||||
m_Enabled: 1
|
||||
m_Alpha: 0
|
||||
m_Alpha: 1
|
||||
m_Interactable: 1
|
||||
m_BlocksRaycasts: 1
|
||||
m_IgnoreParentGroups: 0
|
||||
@ -172,6 +173,18 @@ MonoBehaviour:
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!114 &4655441992065632048
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3342506722007875022}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f6247a8eb0fd999408f36609f20d1efb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &3342506722835179387
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -183,6 +196,7 @@ GameObject:
|
||||
- component: {fileID: 3342506722835179386}
|
||||
- component: {fileID: 3342506722835179388}
|
||||
- component: {fileID: 3342506722835179389}
|
||||
- component: {fileID: 142285502690468267}
|
||||
m_Layer: 5
|
||||
m_Name: Content
|
||||
m_TagString: Untagged
|
||||
@ -197,18 +211,18 @@ RectTransform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3342506722835179387}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
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: 3342506722007875057}
|
||||
m_RootOrder: 2
|
||||
m_Father: {fileID: 6637477610276793240}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 12, y: -18}
|
||||
m_SizeDelta: {x: -44, y: 12}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
m_AnchorMin: {x: 0, y: 0.5}
|
||||
m_AnchorMax: {x: 0, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 6}
|
||||
m_SizeDelta: {x: 0, y: 12}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!222 &3342506722835179388
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -250,6 +264,20 @@ MonoBehaviour:
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: won the title of <color=#a374fe>Climbing King</color>
|
||||
--- !u!114 &142285502690468267
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3342506722835179387}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalFit: 2
|
||||
m_VerticalFit: 0
|
||||
--- !u!1 &3342506723743580663
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -413,3 +441,92 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
radius: 10
|
||||
--- !u!1 &6360137990220479481
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6637477610276793240}
|
||||
- component: {fileID: 8705535217085656055}
|
||||
- component: {fileID: 5068682361598579833}
|
||||
- component: {fileID: 7893164021614858221}
|
||||
m_Layer: 5
|
||||
m_Name: TextContainer
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6637477610276793240
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6360137990220479481}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 3342506722835179386}
|
||||
m_Father: {fileID: 3342506722007875057}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 12, y: -18}
|
||||
m_SizeDelta: {x: -44, y: 12}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
--- !u!222 &8705535217085656055
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6360137990220479481}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &5068682361598579833
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6360137990220479481}
|
||||
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.003921569}
|
||||
m_RaycastTarget: 1
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &7893164021614858221
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6360137990220479481}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 31a19414c41e5ae4aae2af33fee712f6, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_ShowMaskGraphic: 1
|
||||
|
||||
@ -224,9 +224,7 @@ MonoBehaviour:
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: 'Version
|
||||
|
||||
'
|
||||
m_Text: Version
|
||||
--- !u!114 &5064289590597068255
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -853,6 +851,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1206c94b4f7d4f642ad5c7eedf233386, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
newNav: {fileID: 0}
|
||||
--- !u!1 &8419746832695648642
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@ -147,7 +147,7 @@
|
||||
"Comments and suggestions": "评论和意见",
|
||||
"We sincerely look forward to receiving your suggestions......": "我们真诚的希望收到您的建议......",
|
||||
"Submit": "提交",
|
||||
"RACE": "赛事",
|
||||
"RACE": "比赛",
|
||||
"WEIGHT": "体重",
|
||||
"FTP/KG": "功体比",
|
||||
"Total Calories Burned": "累计消耗",
|
||||
@ -175,8 +175,8 @@
|
||||
"Done": "结束",
|
||||
"Join In": "已报名",
|
||||
"Race Name": "赛事名称",
|
||||
"Total Rides": "总计骑行次数",
|
||||
"Total Riding Time": "总计骑行时间",
|
||||
"Total Rides": "骑行次数",
|
||||
"Total Riding Time": "骑行时间",
|
||||
"times": "次",
|
||||
"hours": "H",
|
||||
"KCAL": "KCAL",
|
||||
@ -300,7 +300,9 @@
|
||||
"VIEW1": "查看",
|
||||
"Get The First Place. Time Limit": "第一名已产生,倒计时:",
|
||||
"Competition Time": "比赛时间",
|
||||
"View All": "查看全部"
|
||||
"View All": "查看全部",
|
||||
"ABOUT": "简介",
|
||||
"No Net": "无网络"
|
||||
},
|
||||
"en": {
|
||||
"HOT ROUTES": "HOT ROUTES",
|
||||
@ -594,6 +596,8 @@
|
||||
"VIEW1": "VIEW",
|
||||
"Get The First Place. Time Limit": "Get The First Place. Time Limit",
|
||||
"Competition Time": "Competition Time",
|
||||
"View All": "View All"
|
||||
"View All": "View All",
|
||||
"ABOUT": "ABOUT",
|
||||
"No Net": "No Net"
|
||||
}
|
||||
}
|
||||
|
||||
@ -193,7 +193,12 @@ public static class App
|
||||
//Host = "http://192.168.0.101:5085/";
|
||||
//UdpAddress = new IPEndPoint(IPAddress.Parse("192.168.0.97"), 11000);
|
||||
//TcpAddress = new IPEndPoint(IPAddress.Parse("192.168.0.102"), 21001);
|
||||
//Debug.unityLogger.logEnabled = false;
|
||||
Debug.unityLogger.logEnabled = false;
|
||||
#else
|
||||
//Host = "http://pf.juze.pro/";
|
||||
//Host = "http://192.168.0.101:5087/";
|
||||
UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21000);
|
||||
TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21001);
|
||||
#endif
|
||||
if (!FB.IsInitialized)
|
||||
{
|
||||
|
||||
@ -37,6 +37,7 @@ public class MainController : BaseScene
|
||||
rectTransform.anchorMax = Vector2.one;
|
||||
rectTransform.offsetMin = Vector2.zero;
|
||||
rectTransform.offsetMax = Vector2.zero;
|
||||
transform.Find("GameObject/Version").gameObject.SetActive(false);
|
||||
//var rect1 = transform.Find("GameObject").GetComponent<RectTransform>();
|
||||
//rect1.anchorMin = Vector2.zero;
|
||||
//rect1.anchorMax = Vector2.one;
|
||||
@ -175,15 +176,16 @@ public class MainController : BaseScene
|
||||
if (msgIndex >= 6) //
|
||||
{
|
||||
//msgIndex = 0;
|
||||
//m.transform.DOLocalMoveY(m.transform.localPosition.y - 38, 0.5f);
|
||||
foreach (var item in msgs)
|
||||
{
|
||||
item.transform.DOLocalMoveY(item.transform.localPosition.y - 38, 0.5f);
|
||||
}
|
||||
m.DOFade(0, 0.5f).onComplete = () =>
|
||||
{
|
||||
SetMessage(m, e);
|
||||
m.transform.localPosition = 1 * msgLocation;
|
||||
m.DOFade(1, 0.5f);
|
||||
foreach (var item in msgs.Where((x, i) => i != selectIndex))
|
||||
{
|
||||
item.transform.DOLocalMoveY(item.transform.localPosition.y - 38, 0.5f);
|
||||
}
|
||||
};
|
||||
}
|
||||
else
|
||||
@ -197,6 +199,7 @@ public class MainController : BaseScene
|
||||
}
|
||||
m.DOFade(1, 0.5f);
|
||||
}
|
||||
m.transform.SetAsLastSibling();
|
||||
msgIndex++;
|
||||
}
|
||||
|
||||
@ -214,7 +217,12 @@ public class MainController : BaseScene
|
||||
#else
|
||||
if (!(bool)sender)
|
||||
{
|
||||
FinishMessage6();
|
||||
//FinishMessage6();
|
||||
transform.Find("GameObject").SetAsFirstSibling();
|
||||
}
|
||||
else
|
||||
{
|
||||
transform.Find("GameObject").SetSiblingIndex(1);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@ -253,15 +261,23 @@ public class MainController : BaseScene
|
||||
{
|
||||
if (e.routeId > 0)
|
||||
{
|
||||
App.RouteIdParam = e.routeId;
|
||||
SceneManager.LoadScene("Ride");
|
||||
UIManager.ShowConfirm(App.GetLocalString("RIDE NOW"), App.GetLocalLanguage() == "zh"? $"<color=#fff>是否要加入</color><color=#f93086>{e.routeName}</color><color=#fff>骑行?</color>" :$"<color=#fff>Join</color> <color=#f93086>{e.routeName}</color><color=#fff>?</color>", () =>
|
||||
{
|
||||
App.RouteIdParam = e.routeId;
|
||||
SceneManager.LoadScene("Ride");
|
||||
});
|
||||
}
|
||||
//Debug.Log(e.routeId);
|
||||
});
|
||||
m.transform.Find("Avatar").GetComponent<RawImage>().texture = null;
|
||||
Utils.DisplayHead(m.transform.Find("Avatar").GetComponent<RawImage>(), e.avatar);
|
||||
m.transform.Find("Nickname").GetComponent<Text>().text = e.nickname;
|
||||
m.transform.Find("Content").GetComponent<Text>().text = e.content;
|
||||
var txt = m.transform.Find("TextContainer/Content").GetComponent<RectTransform>();
|
||||
txt.GetComponent<Text>().text = e.content;
|
||||
LayoutRebuilder.ForceRebuildLayoutImmediate(txt);
|
||||
Debug.Log(e.content + txt.sizeDelta.x);
|
||||
m.GetComponent<HomeMessageController>().isAnimated = false;
|
||||
m.GetComponent<HomeMessageController>().textWidth = txt.sizeDelta.x;
|
||||
}
|
||||
CanvasGroup msg;
|
||||
void fade0()
|
||||
@ -387,51 +403,51 @@ public class MainController : BaseScene
|
||||
var message = "";
|
||||
if (item.TotalTicks == 0)
|
||||
{
|
||||
message = lang=="zh"?$"发起了对<color=#ff2742>{item.RouteName}</color>的挑战": $"start a challenge to the<color=#ff2742>{item.RouteName}</color>";
|
||||
message = lang=="zh"?$"发起了对<color=#f93086>{item.RouteName}</color>的挑战!" : $"started riding <color=#f93086>{item.RouteName}</color>!";
|
||||
}
|
||||
if (item.IsCompleted)
|
||||
{
|
||||
message = lang == "zh" ? $"完成了<color=#ff2742>{item.RouteName}</color>的挑战": $"completed the challenge of the<color=#ff2742>{item.RouteName}</color>";
|
||||
message = lang == "zh" ? $"完成了<color=#f93086>{item.RouteName}</color>的挑战!" : $"completed <color=#f93086>{item.RouteName}</color> ride!";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(message))
|
||||
{
|
||||
EventQueueSystem.QueueEventOnce(new LinkedMessageEvent(item.RouteId, message, item.HeadImage, item.Name), $"{item.RouteId}{item.Name}");
|
||||
EventQueueSystem.QueueEventOnce(new LinkedMessageEvent(item.RouteId, message, item.HeadImage, item.Name,item.RouteName), $"{item.RouteId}{item.Name}");
|
||||
}
|
||||
}
|
||||
if (item.Point[0] == -1d)
|
||||
if (item.Point!=null && item.Point.Length>0 && item.Point[0] == -1d)
|
||||
{
|
||||
var message = $"{item.Name}上线了";
|
||||
EventQueueSystem.QueueEventOnce(new LinkedMessageEvent(item.RouteId, message, item.HeadImage, item.Name), $"{item.Id}{item.LastActiveTime}{item.Point}");
|
||||
var message = lang == "zh" ? $"{item.Name}进入了 运动地球" : "entered PowerFun";
|
||||
EventQueueSystem.QueueEventOnce(new LinkedMessageEvent(item.RouteId, message, item.HeadImage, item.Name, item.RouteName), $"{item.Id}{item.LastActiveTime}{item.Point}");
|
||||
}
|
||||
//距离50
|
||||
if (item.EndDistance >= 50)
|
||||
{
|
||||
var message = lang == "zh" ? $"在骑行过程中突破了<color=#00ff00>{"50KM"}</color>的挑战" : $"distance up to <color=#00ff00>{"50KM"}</color> during riding!";
|
||||
EventQueueSystem.QueueEventOnce(new LinkedMessageEvent(item.RouteId, message, item.HeadImage, item.Name), $"{item.RouteId}{item.Name}50KM");
|
||||
var message = lang == "zh" ? $"骑行里程突破<color=#e3d427>{"50KM"}</color>!" : $"riding distance reaches <color=#e3d427>{"50KM"}</color>!";
|
||||
EventQueueSystem.QueueEventOnce(new LinkedMessageEvent(item.RouteId, message, item.HeadImage, item.Name, item.RouteName), $"{item.RouteId}{item.Name}50KM");
|
||||
}
|
||||
//距离100
|
||||
if (item.EndDistance >= 100)
|
||||
{
|
||||
var message = lang == "zh" ? $"在骑行过程中突破了<color=#00ff00>{"100KM"}</color>的挑战": $"distance up to <color=#00ff00>{"100KM"}</color> during riding!";
|
||||
EventQueueSystem.QueueEventOnce(new LinkedMessageEvent(item.RouteId, message, item.HeadImage, item.Name), $"{item.RouteId}{item.Name}50KM");
|
||||
var message = lang == "zh" ? $"骑行里程突破<color=#e3d427>{"100KM"}</color>!" : $"riding distance reaches <color=#e3d427>{"100KM"}</color>!";
|
||||
EventQueueSystem.QueueEventOnce(new LinkedMessageEvent(item.RouteId, message, item.HeadImage, item.Name, item.RouteName), $"{item.RouteId}{item.Name}100KM");
|
||||
}
|
||||
//速度35
|
||||
if (item.Speed >= 35)
|
||||
{
|
||||
var message = lang == "zh" ? $"在骑行过程中速度达到了惊人的<color=#ff0000>{Math.Round(item.Speed, 2)}</color>KM/H": $"speed up to <color=#ff0000>{Math.Round(item.Speed, 2)}</color>KM/H during riding!";
|
||||
EventQueueSystem.QueueEventOnce(new LinkedMessageEvent(item.RouteId, message, item.HeadImage, item.Name), $"{item.RouteId}{item.Name}35KM/H");
|
||||
var message = lang == "zh" ? $"骑行速度突破<color=#e3d427>{Math.Round(item.Speed, 2)}</color>KM/H!" : $"riding speed reaches <color=#e3d427>{Math.Round(item.Speed, 2)}</color>KM/H!";
|
||||
EventQueueSystem.QueueEventOnce(new LinkedMessageEvent(item.RouteId, message, item.HeadImage, item.Name, item.RouteName), $"{item.RouteId}{item.Name}35KM/H");
|
||||
}
|
||||
//速度50
|
||||
if (item.Speed >= 50)
|
||||
{
|
||||
var message = lang == "zh" ? $"在骑行过程中速度达到了惊人的<color=#ff0000>{Math.Round(item.Speed,2)}</color>KM/H" : $"speed up to <color=#ff0000>{Math.Round(item.Speed, 2)}</color>KM/H during riding!";
|
||||
EventQueueSystem.QueueEventOnce(new LinkedMessageEvent(item.RouteId, message, item.HeadImage, item.Name), $"{item.RouteId}{item.Name}50KM/H");
|
||||
var message = lang == "zh" ? $"骑行速度突破<color=#e3d427>{Math.Round(item.Speed,2)}</color>KM/H!" : $"riding speed reaches <color=#e3d427>{Math.Round(item.Speed, 2)}</color>KM/H!";
|
||||
EventQueueSystem.QueueEventOnce(new LinkedMessageEvent(item.RouteId, message, item.HeadImage, item.Name, item.RouteName), $"{item.RouteId}{item.Name}50KM/H");
|
||||
}
|
||||
//功体比
|
||||
if (item.WeightKg >= 3)
|
||||
{
|
||||
var message = lang == "zh" ? $"在骑行过程中功体比达到了惊人的<color=#0000ff>{Math.Round(item.WeightKg, 2)}</color>w/kg": $"w/kg up to <color=#0000ff>{Math.Round(item.WeightKg, 2)}</color>w/kg during riding!";
|
||||
EventQueueSystem.QueueEventOnce(new LinkedMessageEvent(item.RouteId, message, item.HeadImage, item.Name), $"{item.RouteId}{item.Name}3WeightKg");
|
||||
var message = lang == "zh" ? $"骑行功体比突破<color=#e3d427>{Math.Round(item.WeightKg, 2)}</color>w/kg!" : $" riding w/kg reaches <color=#e3d427>{Math.Round(item.WeightKg, 2)}</color>w/kg!";
|
||||
EventQueueSystem.QueueEventOnce(new LinkedMessageEvent(item.RouteId, message, item.HeadImage, item.Name, item.RouteName), $"{item.RouteId}{item.Name}3WeightKg");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -451,7 +467,7 @@ public class MainController : BaseScene
|
||||
{
|
||||
foreach (var item in res.data)
|
||||
{
|
||||
EventQueueSystem.QueueEvent(new LinkedMessageEvent(-1, item.Message, item.WxHeadImg, item.NickName));
|
||||
EventQueueSystem.QueueEvent(new LinkedMessageEvent(-1, item.Message, item.WxHeadImg, item.NickName,null));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -90,6 +90,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
public class LinkedMessageEvent : GameEvent
|
||||
{
|
||||
public int routeId;//线路Id
|
||||
public string routeName;
|
||||
public string content;//消息
|
||||
public string avatar;
|
||||
public string nickname;
|
||||
@ -98,12 +99,13 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
this.routeId = routeId;
|
||||
this.content = content;
|
||||
}
|
||||
public LinkedMessageEvent(int routeId, string content,string avatar,string nickname)
|
||||
public LinkedMessageEvent(int routeId, string content,string avatar,string nickname,string routeName)
|
||||
{
|
||||
this.routeId = routeId;
|
||||
this.content = content;
|
||||
this.avatar = avatar;
|
||||
this.nickname = nickname;
|
||||
this.routeName = routeName;
|
||||
}
|
||||
|
||||
private void CreateContent()
|
||||
|
||||
@ -176,9 +176,20 @@ public class NewMainNav : MonoBehaviour
|
||||
#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);
|
||||
if (delayTime <= 0)
|
||||
{
|
||||
delayTime = 3;
|
||||
transform.Find("Delay/Tooltips").gameObject.SetActive(true);
|
||||
transform.Find("Delay/Tooltips").GetComponent<CanvasGroup>().DOFade(1, 0.5f);
|
||||
}
|
||||
else
|
||||
{
|
||||
delayTime = 0;
|
||||
transform.Find("Delay/Tooltips").GetComponent<CanvasGroup>().DOFade(0, 0.5f).onComplete = () =>
|
||||
{
|
||||
transform.Find("Delay/Tooltips").gameObject.SetActive(false);
|
||||
};
|
||||
}
|
||||
});
|
||||
#endif
|
||||
//transform.Find("Delay").GetComponent<PfUIButton>().showTooltip = true;
|
||||
@ -246,7 +257,7 @@ public class NewMainNav : MonoBehaviour
|
||||
isTouch = false;
|
||||
hideTime += 5;
|
||||
}
|
||||
Debug.Log(Input.touchCount);
|
||||
//Debug.Log(Input.touchCount);
|
||||
if (delayTime < 0)
|
||||
{
|
||||
Debug.Log("小时");
|
||||
|
||||
@ -100,7 +100,7 @@ public class MapListController : PFUIPanel
|
||||
nav.SetButtonActive(new List<int> { 0, 3, 4, 6, 7 }, 0,
|
||||
new NewMainNav.CustomButton(Resources.Load<Sprite>("Images/Mobile/map_筛选"), () =>
|
||||
{
|
||||
OpenFilter();
|
||||
OpenFilter(false);
|
||||
}));
|
||||
newNav = nav;
|
||||
#else
|
||||
@ -286,7 +286,7 @@ public class MapListController : PFUIPanel
|
||||
}
|
||||
caches = new Dictionary<string, Texture>();
|
||||
}
|
||||
public void OpenFilter()
|
||||
public void OpenFilter(bool isFocusSearch = true)
|
||||
{
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
var topRect = transform.Find("Top").GetComponent<RectTransform>();
|
||||
@ -300,7 +300,10 @@ public class MapListController : PFUIPanel
|
||||
mc.GetComponent<CanvasGroup>().alpha = 0;
|
||||
mc.GetComponent<CanvasGroup>().DOFade(1, 0.3f);
|
||||
#endif
|
||||
topRect.Find("SearchInput").GetComponent<InputField>().OnPointerClick(new PointerEventData(EventSystem.current));
|
||||
if (isFocusSearch)
|
||||
{
|
||||
topRect.Find("SearchInput").GetComponent<InputField>().OnPointerClick(new PointerEventData(EventSystem.current));
|
||||
}
|
||||
}
|
||||
void onEndEdit()
|
||||
{
|
||||
|
||||
@ -80,7 +80,7 @@ public class NewRouteDetailController : PFUIPanel
|
||||
if (res.result)
|
||||
{
|
||||
p.GetComponent<Image>().sprite = FavDict[!act];
|
||||
Utils.showToast(null, App.GetLocalString("Success"), type: 1);
|
||||
//Utils.showToast(null, App.GetLocalString("Success"), type: 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -12,7 +12,7 @@ using Assets.Scripts;
|
||||
//{
|
||||
public class PFUIPanel : UIBehaviour
|
||||
{
|
||||
public NewMainNav newNav = null;
|
||||
[HideInInspector]public NewMainNav newNav = null;
|
||||
public void OpenURL(string url)
|
||||
{
|
||||
Application.OpenURL(url);
|
||||
|
||||
@ -115,22 +115,22 @@ public class UserInfoController : PFUIPanel
|
||||
infoPanel.Find("Container/Weight").Find("Value").GetComponent<Text>().text = $"{user.Weight}KG";
|
||||
infoPanel.Find("Container/BW").Find("Value").GetComponent<Text>().text = $"{user.BicycleWeight}KG";
|
||||
infoPanel.Find("Container/WD").Find("Value").GetComponent<Text>().text = $"{user.WheelDiameter}MM";
|
||||
infoPanel.Find("Container/Ftp").Find("Time").GetComponent<Text>().text = user.LastUpdateFtpTime.ToString("dd-MM-yyyy");
|
||||
infoPanel.Find("Container/Weight").Find("Time").GetComponent<Text>().text = user.LastUpdateWeightTime.ToString("dd-MM-yyyy");
|
||||
infoPanel.Find("Container/BW").Find("Time").GetComponent<Text>().text = user.LastUpdateBicycleWeightTime.ToString("dd-MM-yyyy");
|
||||
infoPanel.Find("Container/WD").Find("Time").GetComponent<Text>().text = user.LastUpdateWheelStraight.ToString("dd-MM-yyyy");
|
||||
infoPanel.Find("Container/MHR").Find("Time").GetComponent<Text>().text = user.LastUpdateMaxHeartRate.ToString("dd-MM-yyyy");
|
||||
infoPanel.Find("Container/Ftp").Find("Time").GetComponent<Text>().text = user.LastUpdateFtpTime.ToLocalString("dd-MM-yyyy");
|
||||
infoPanel.Find("Container/Weight").Find("Time").GetComponent<Text>().text = user.LastUpdateWeightTime.ToLocalString("dd-MM-yyyy");
|
||||
infoPanel.Find("Container/BW").Find("Time").GetComponent<Text>().text = user.LastUpdateBicycleWeightTime.ToLocalString("dd-MM-yyyy");
|
||||
infoPanel.Find("Container/WD").Find("Time").GetComponent<Text>().text = user.LastUpdateWheelStraight.ToLocalString("dd-MM-yyyy");
|
||||
infoPanel.Find("Container/MHR").Find("Time").GetComponent<Text>().text = user.LastUpdateMaxHeartRate.ToLocalString("dd-MM-yyyy");
|
||||
#else
|
||||
infoPanel.Find("Ftp").Find("Value").GetComponent<Text>().text = user.FTP.ToString();
|
||||
infoPanel.Find("MHR").Find("Value").GetComponent<Text>().text = user.MaxHeartRate.ToString();
|
||||
infoPanel.Find("Weight").Find("Value").GetComponent<Text>().text = $"{user.Weight}KG";
|
||||
infoPanel.Find("BW").Find("Value").GetComponent<Text>().text = $"{user.BicycleWeight}KG";
|
||||
infoPanel.Find("WD").Find("Value").GetComponent<Text>().text = $"{user.WheelDiameter}MM";
|
||||
infoPanel.Find("Ftp").Find("Time").GetComponent<Text>().text = user.LastUpdateFtpTime.ToString("dd-MM-yyyy");
|
||||
infoPanel.Find("Weight").Find("Time").GetComponent<Text>().text = user.LastUpdateWeightTime.ToString("dd-MM-yyyy");
|
||||
infoPanel.Find("BW").Find("Time").GetComponent<Text>().text = user.LastUpdateBicycleWeightTime.ToString("dd-MM-yyyy");
|
||||
infoPanel.Find("WD").Find("Time").GetComponent<Text>().text = user.LastUpdateWheelStraight.ToString("dd-MM-yyyy");
|
||||
infoPanel.Find("MHR").Find("Time").GetComponent<Text>().text = user.LastUpdateMaxHeartRate.ToString("dd-MM-yyyy");
|
||||
infoPanel.Find("Ftp").Find("Time").GetComponent<Text>().text = user.LastUpdateFtpTime.ToLocalString("dd-MM-yyyy");
|
||||
infoPanel.Find("Weight").Find("Time").GetComponent<Text>().text = user.LastUpdateWeightTime.ToLocalString("dd-MM-yyyy");
|
||||
infoPanel.Find("BW").Find("Time").GetComponent<Text>().text = user.LastUpdateBicycleWeightTime.ToLocalString("dd-MM-yyyy");
|
||||
infoPanel.Find("WD").Find("Time").GetComponent<Text>().text = user.LastUpdateWheelStraight.ToLocalString("dd-MM-yyyy");
|
||||
infoPanel.Find("MHR").Find("Time").GetComponent<Text>().text = user.LastUpdateMaxHeartRate.ToLocalString("dd-MM-yyyy");
|
||||
#endif
|
||||
if (user.Sex == 2)
|
||||
{
|
||||
|
||||
@ -78,7 +78,7 @@ public class LocalRouteItem : MonoBehaviour, IPointerExitHandler, IPointerEnterH
|
||||
}
|
||||
|
||||
Name.text = record.RouteName;
|
||||
Time.text = record.StartTime.ToString("HH:mm:ss dd-MM-yyyy");
|
||||
Time.text = record.StartTime.ToLocalString("HH:mm:ss dd-MM-yyyy");
|
||||
RidingTime.text = $"<color={titleColor}>{App.GetLocalString("Riding time")}:</color>{Helper.FormatTicks(record.Ticks)}";
|
||||
RidingDistance.text = $"<color={titleColor}>{App.GetLocalString("Mileage")}:</color>{record.EndDistance.ToString("#0.00")}KM";
|
||||
Device.text = $"<color={titleColor}>{App.GetLocalString("Cycling equipment")}:</color>{record.ManufacturerName}";
|
||||
|
||||
@ -135,7 +135,7 @@ public class RouteItem : MonoBehaviour
|
||||
//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");
|
||||
left.Find("Main").Find("Time").GetComponent<Text>().text = result.CreateTime.ToLocalString("HH:mm:ss dd-MM-yyyy");
|
||||
row1.Find("Time").GetComponent<Text>().text = $"<color={titleColor}>{App.GetLocalString("Riding Time")}:</color>{result.TrainingTime}";
|
||||
row1.Find("Distance").GetComponent<Text>().text = $"<color={titleColor}>{App.GetLocalString("Mileage")}:</color>{result.EndDistance.ToString("#0.00")}KM";
|
||||
row1.Find("Times").GetComponent<Text>().text = $"<color={titleColor}>{App.GetLocalString("Times")}:</color>{result.Count}";
|
||||
|
||||
@ -808,5 +808,19 @@ namespace Assets.Scripts
|
||||
// Stops the location service if there is no need to query location updates continuously.
|
||||
Input.location.Stop();
|
||||
}
|
||||
public static string ToLocalString(this DateTime time, string format)
|
||||
{
|
||||
if (App.GetLocalLanguage() == "en")
|
||||
{
|
||||
return time.ToString(format);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(format == "HH:mm:ss dd-MM-yyyy")
|
||||
return time.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
else
|
||||
return time.ToString("yyyy-MM-dd");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user