loading页面Tips调整&骑行卡顿问题解决
This commit is contained in:
parent
0628bd3716
commit
43dc844998
@ -1030,8 +1030,8 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 60, y: 21}
|
||||
m_SizeDelta: {x: 518, y: 6}
|
||||
m_AnchoredPosition: {x: 60, y: 31}
|
||||
m_SizeDelta: {x: 480, y: 6}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!114 &2322716380738134731
|
||||
MonoBehaviour:
|
||||
@ -3132,7 +3132,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 563, y: 29}
|
||||
m_AnchoredPosition: {x: 525.8, y: 39}
|
||||
m_SizeDelta: {x: 30, y: 14}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3007624749774178325
|
||||
@ -3482,7 +3482,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &3007624750140628948
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -4377,7 +4377,7 @@ PrefabInstance:
|
||||
- target: {fileID: 5170894839205404110, guid: 3bf4a1387517769468dd74f58f7dc777,
|
||||
type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 29
|
||||
value: 39
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5170894839205404110, guid: 3bf4a1387517769468dd74f58f7dc777,
|
||||
type: 3}
|
||||
|
||||
@ -16,9 +16,9 @@ namespace Assets.Scripts.Apis
|
||||
{
|
||||
return Get($"Map/GetMapToken?name={name}");
|
||||
}
|
||||
public string GetTipsList()
|
||||
public JsonResult<List<string>> GetTipsList()
|
||||
{
|
||||
return Get($"Map/GetTipList");
|
||||
return Get<JsonResult<List<string>>>($"Map/GetTipList");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -117,8 +117,10 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
//实时计算MaxAp
|
||||
//mainController.ComputeMaxAP(Power, ticks);
|
||||
//实时保存骑行记录
|
||||
|
||||
mainController.SaveRealTime();
|
||||
if (ticks / 60 == 0)
|
||||
{
|
||||
mainController.SaveRealTime();
|
||||
}
|
||||
}
|
||||
}
|
||||
protected override void BeforeRun()
|
||||
|
||||
@ -11,17 +11,17 @@ public class MultiTips:PFUIText
|
||||
private Button button;
|
||||
private string[] tips { get; set; }
|
||||
private int currentIndex = 0;
|
||||
|
||||
private System.Random random;
|
||||
new void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
text = GetComponent<Text>();
|
||||
var tiplist = ConfigHelper.mapApi.GetTipsList();
|
||||
if (!string.IsNullOrEmpty(tiplist))
|
||||
var result = ConfigHelper.mapApi.GetTipsList();
|
||||
if (result.result)
|
||||
{
|
||||
tips = tiplist.Split('#');
|
||||
tips = result.data.ToArray();
|
||||
}
|
||||
var random = new System.Random();
|
||||
random = new System.Random();
|
||||
currentIndex = random.Next(0, tips.Length);
|
||||
SetText();
|
||||
}
|
||||
@ -32,21 +32,14 @@ public class MultiTips:PFUIText
|
||||
}
|
||||
public void SetText()
|
||||
{
|
||||
if(text == null)
|
||||
if(text == null || tips.Length == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
currentIndex = random.Next(0, tips.Length);
|
||||
if (currentIndex <= tips.Length)
|
||||
{
|
||||
text.text = tips[currentIndex];
|
||||
if (currentIndex + 1 < tips.Length)
|
||||
{
|
||||
currentIndex++;
|
||||
}
|
||||
else
|
||||
{
|
||||
currentIndex = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
float time = 10f;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user