bug修复
This commit is contained in:
parent
45c66a4fb4
commit
5593462e2b
@ -5854,6 +5854,7 @@ GameObject:
|
|||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 1884241085}
|
- component: {fileID: 1884241085}
|
||||||
- component: {fileID: 1884241086}
|
- component: {fileID: 1884241086}
|
||||||
|
- component: {fileID: 1884241087}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: SpawnMonster
|
m_Name: SpawnMonster
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@ -5898,6 +5899,18 @@ MonoBehaviour:
|
|||||||
GenerateQuantityMax: 20
|
GenerateQuantityMax: 20
|
||||||
GenerateQuantity: 5
|
GenerateQuantity: 5
|
||||||
deadNumber: 0
|
deadNumber: 0
|
||||||
|
--- !u!114 &1884241087
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1884241084}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 97664c5246bb0d242997921b3560d036, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
--- !u!1 &1932457212
|
--- !u!1 &1932457212
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -13918,7 +13918,7 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 1, y: 0.5}
|
m_AnchorMin: {x: 1, y: 0.5}
|
||||||
m_AnchorMax: {x: 1, y: 0.5}
|
m_AnchorMax: {x: 1, y: 0.5}
|
||||||
m_AnchoredPosition: {x: -35.921356, y: 0}
|
m_AnchoredPosition: {x: -27, y: 0}
|
||||||
m_SizeDelta: {x: 71.8427, y: 71.8427}
|
m_SizeDelta: {x: 71.8427, y: 71.8427}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &148769171
|
--- !u!114 &148769171
|
||||||
@ -24084,8 +24084,8 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 1, y: 1}
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
m_AnchoredPosition: {x: 22.5, y: 2.2}
|
m_AnchoredPosition: {x: 58.315002, y: 0.000049591064}
|
||||||
m_SizeDelta: {x: 0, y: 0}
|
m_SizeDelta: {x: -116.63, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &283076767
|
--- !u!114 &283076767
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
@ -24114,7 +24114,7 @@ MonoBehaviour:
|
|||||||
m_BestFit: 1
|
m_BestFit: 1
|
||||||
m_MinSize: 1
|
m_MinSize: 1
|
||||||
m_MaxSize: 40
|
m_MaxSize: 40
|
||||||
m_Alignment: 4
|
m_Alignment: 3
|
||||||
m_AlignByGeometry: 0
|
m_AlignByGeometry: 0
|
||||||
m_RichText: 1
|
m_RichText: 1
|
||||||
m_HorizontalOverflow: 0
|
m_HorizontalOverflow: 0
|
||||||
@ -43233,8 +43233,8 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 1, y: 1}
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
m_AnchoredPosition: {x: 22.5, y: 2.2}
|
m_AnchoredPosition: {x: 68.07, y: 0.000049591064}
|
||||||
m_SizeDelta: {x: 0, y: 0}
|
m_SizeDelta: {x: -136.14, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &495265248
|
--- !u!114 &495265248
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
@ -43263,7 +43263,7 @@ MonoBehaviour:
|
|||||||
m_BestFit: 1
|
m_BestFit: 1
|
||||||
m_MinSize: 1
|
m_MinSize: 1
|
||||||
m_MaxSize: 40
|
m_MaxSize: 40
|
||||||
m_Alignment: 4
|
m_Alignment: 3
|
||||||
m_AlignByGeometry: 0
|
m_AlignByGeometry: 0
|
||||||
m_RichText: 1
|
m_RichText: 1
|
||||||
m_HorizontalOverflow: 0
|
m_HorizontalOverflow: 0
|
||||||
@ -48820,8 +48820,8 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 1, y: 1}
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
m_AnchoredPosition: {x: 0, y: 0.000022888184}
|
m_AnchoredPosition: {x: 23.8, y: 0.000049591064}
|
||||||
m_SizeDelta: {x: 0, y: 0}
|
m_SizeDelta: {x: 4.0677, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &565435911
|
--- !u!114 &565435911
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
@ -105993,8 +105993,8 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
m_AnchoredPosition: {x: 150.75, y: 41}
|
m_AnchoredPosition: {x: 252.93, y: 41}
|
||||||
m_SizeDelta: {x: 777.5, y: 115}
|
m_SizeDelta: {x: 573.14, y: 115}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &1218477463
|
--- !u!114 &1218477463
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
@ -106009,12 +106009,12 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_Padding:
|
m_Padding:
|
||||||
m_Left: 208
|
m_Left: -59
|
||||||
m_Right: 99
|
m_Right: 99
|
||||||
m_Top: 0
|
m_Top: 0
|
||||||
m_Bottom: 0
|
m_Bottom: 0
|
||||||
m_ChildAlignment: 4
|
m_ChildAlignment: 4
|
||||||
m_Spacing: 0
|
m_Spacing: -21.37
|
||||||
m_ChildForceExpandWidth: 1
|
m_ChildForceExpandWidth: 1
|
||||||
m_ChildForceExpandHeight: 1
|
m_ChildForceExpandHeight: 1
|
||||||
m_ChildControlWidth: 0
|
m_ChildControlWidth: 0
|
||||||
@ -106466,7 +106466,7 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 1}
|
||||||
m_AnchoredPosition: {x: 118.53667, y: -57.5}
|
m_AnchoredPosition: {x: -295.1386, y: -57.5}
|
||||||
m_SizeDelta: {x: 280, y: 86}
|
m_SizeDelta: {x: 280, y: 86}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!1 &1222913632
|
--- !u!1 &1222913632
|
||||||
@ -121434,7 +121434,7 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 1, y: 1}
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
m_AnchoredPosition: {x: 0, y: 0.000022888184}
|
m_AnchoredPosition: {x: 11.1, y: -3.8}
|
||||||
m_SizeDelta: {x: 0, y: 0}
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &1411013103
|
--- !u!114 &1411013103
|
||||||
@ -132639,8 +132639,8 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
m_AnchoredPosition: {x: 19.48999, y: 0}
|
m_AnchoredPosition: {x: 31.958292, y: 0}
|
||||||
m_SizeDelta: {x: 189.02, y: 56}
|
m_SizeDelta: {x: 213.9567, y: 56}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &1548918930
|
--- !u!114 &1548918930
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
@ -142969,8 +142969,8 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 1}
|
||||||
m_AnchoredPosition: {x: 628, y: -57.5}
|
m_AnchoredPosition: {x: 398.4879, y: -57.5}
|
||||||
m_SizeDelta: {x: 280, y: 86}
|
m_SizeDelta: {x: 296.3652, y: 86}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!1 &1665185078
|
--- !u!1 &1665185078
|
||||||
GameObject:
|
GameObject:
|
||||||
@ -161864,8 +161864,8 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 1}
|
||||||
m_AnchoredPosition: {x: 348, y: -57.5}
|
m_AnchoredPosition: {x: 106.33765, y: -57.5}
|
||||||
m_SizeDelta: {x: 280, y: 86}
|
m_SizeDelta: {x: 330.6753, y: 86}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!1 &1889134673
|
--- !u!1 &1889134673
|
||||||
GameObject:
|
GameObject:
|
||||||
@ -172072,8 +172072,8 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
m_AnchoredPosition: {x: 19.48999, y: 0}
|
m_AnchoredPosition: {x: 32.58972, y: 0}
|
||||||
m_SizeDelta: {x: 189.02, y: 56}
|
m_SizeDelta: {x: 215.2195, y: 56}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &1982184202
|
--- !u!114 &1982184202
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
@ -197595,7 +197595,7 @@ MonoBehaviour:
|
|||||||
m_Alignment: 4
|
m_Alignment: 4
|
||||||
m_AlignByGeometry: 0
|
m_AlignByGeometry: 0
|
||||||
m_RichText: 1
|
m_RichText: 1
|
||||||
m_HorizontalOverflow: 0
|
m_HorizontalOverflow: 1
|
||||||
m_VerticalOverflow: 0
|
m_VerticalOverflow: 0
|
||||||
m_LineSpacing: 1
|
m_LineSpacing: 1
|
||||||
m_Text: 2000/3000
|
m_Text: 2000/3000
|
||||||
|
@ -140,7 +140,7 @@ public class WaterPanel : MonoBehaviour
|
|||||||
|
|
||||||
public void Updated_water(TreeInfo info)
|
public void Updated_water(TreeInfo info)
|
||||||
{
|
{
|
||||||
waterCountText.text = info.Data.Water.ToString();
|
waterCountText.text = info.Data.Water.ToString("F2");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -82,10 +82,10 @@ public class AssetsPanel : MonoBehaviour
|
|||||||
{
|
{
|
||||||
isUpdating = true;
|
isUpdating = true;
|
||||||
CapitalbalanceIndefo CapitalbalanceData = await Scene_main_jiekou.instance.CapitalbalanceInfos();
|
CapitalbalanceIndefo CapitalbalanceData = await Scene_main_jiekou.instance.CapitalbalanceInfos();
|
||||||
Stone.text = CapitalbalanceData.data.gem.ToString();
|
Stone.text = CapitalbalanceData.data.gem.ToString("F2");
|
||||||
Coin.text = CapitalbalanceData.data.gold.ToString();
|
Coin.text = CapitalbalanceData.data.gold.ToString("F2");
|
||||||
Ore.text = CapitalbalanceData.data.water.ToString();
|
Ore.text = CapitalbalanceData.data.water.ToString("F2");
|
||||||
Forging.text = CapitalbalanceData.data.forge.ToString();
|
Forging.text = CapitalbalanceData.data.forge.ToString("F2");
|
||||||
CapitalbalanceData = null;
|
CapitalbalanceData = null;
|
||||||
// 异步操作完成,标记为未执行
|
// 异步操作完成,标记为未执行
|
||||||
isUpdating = false;
|
isUpdating = false;
|
||||||
|
@ -28,6 +28,8 @@ public class Promotion_Rank : MonoBehaviour
|
|||||||
public Text countdown;
|
public Text countdown;
|
||||||
List<GameObject> Items = new List<GameObject>();
|
List<GameObject> Items = new List<GameObject>();
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
|
private float lastCallTime = 0f;
|
||||||
|
private float interval = 1f; // 每秒调用一次
|
||||||
|
|
||||||
float remainingTime=0f;
|
float remainingTime=0f;
|
||||||
void OnEnable()
|
void OnEnable()
|
||||||
@ -39,24 +41,61 @@ public class Promotion_Rank : MonoBehaviour
|
|||||||
async void Init()
|
async void Init()
|
||||||
{
|
{
|
||||||
PromotionRankResponse response = await Scene_main_jiekou.instance.PromotionRanks();
|
PromotionRankResponse response = await Scene_main_jiekou.instance.PromotionRanks();
|
||||||
|
|
||||||
Firstlevel.text = response.data.ranks[0].rank.ToString();
|
|
||||||
FirstName.text = response.data.ranks[0].nickname;
|
|
||||||
Firstcount.text = response.data.ranks[0].quantity + "/" + response.data.ranks[0].require;
|
|
||||||
FitstPrize.text = response.data.ranks[0].reward.ToString();
|
|
||||||
|
|
||||||
|
|
||||||
Secondlevel.text = response.data.ranks[1].rank.ToString();
|
|
||||||
SecondName.text = response.data.ranks[1].nickname;
|
|
||||||
Secondcount.text = response.data.ranks[1].quantity + "/" + response.data.ranks[1].require;
|
|
||||||
SecondPrize.text = response.data.ranks[1].reward.ToString();
|
|
||||||
|
|
||||||
Thirdlevel.text = response.data.ranks[2].rank.ToString();
|
|
||||||
ThirdName.text = response.data.ranks[2].nickname;
|
|
||||||
Thirdcount.text = response.data.ranks[2].quantity + "/" + response.data.ranks[2].require;
|
|
||||||
ThirdPrize.text = response.data.ranks[2].reward.ToString();
|
|
||||||
|
|
||||||
remainingTime = response.data.countdown;
|
remainingTime = response.data.countdown;
|
||||||
|
UpdateCountdownText(remainingTime);
|
||||||
|
|
||||||
|
switch (response.data.ranks.Count)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
Firstlevel.text = response.data.ranks[0].rank.ToString();
|
||||||
|
FirstName.text = response.data.ranks[0].nickname;
|
||||||
|
Firstcount.text = response.data.ranks[0].quantity + "/" + response.data.ranks[0].require;
|
||||||
|
FitstPrize.text = response.data.ranks[0].reward.ToString();
|
||||||
|
|
||||||
|
Secondlevel.text ="2";
|
||||||
|
SecondName.text = "";
|
||||||
|
Secondcount.text = "";
|
||||||
|
SecondPrize.text = "";
|
||||||
|
|
||||||
|
Thirdlevel.text = "3";
|
||||||
|
ThirdName.text ="";
|
||||||
|
Thirdcount.text = "";
|
||||||
|
ThirdPrize.text ="";
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
Firstlevel.text = response.data.ranks[0].rank.ToString();
|
||||||
|
FirstName.text = response.data.ranks[0].nickname;
|
||||||
|
Firstcount.text = response.data.ranks[0].quantity + "/" + response.data.ranks[0].require;
|
||||||
|
FitstPrize.text = response.data.ranks[0].reward.ToString();
|
||||||
|
|
||||||
|
Secondlevel.text = response.data.ranks[1].rank.ToString();
|
||||||
|
SecondName.text = response.data.ranks[1].nickname;
|
||||||
|
Secondcount.text = response.data.ranks[1].quantity + "/" + response.data.ranks[1].require;
|
||||||
|
SecondPrize.text = response.data.ranks[1].reward.ToString();
|
||||||
|
|
||||||
|
Thirdlevel.text = "3";
|
||||||
|
ThirdName.text = "";
|
||||||
|
Thirdcount.text = "";
|
||||||
|
ThirdPrize.text = "";
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
Firstlevel.text = response.data.ranks[0].rank.ToString();
|
||||||
|
FirstName.text = response.data.ranks[0].nickname;
|
||||||
|
Firstcount.text = response.data.ranks[0].quantity + "/" + response.data.ranks[0].require;
|
||||||
|
FitstPrize.text = response.data.ranks[0].reward.ToString();
|
||||||
|
|
||||||
|
Secondlevel.text = response.data.ranks[1].rank.ToString();
|
||||||
|
SecondName.text = response.data.ranks[1].nickname;
|
||||||
|
Secondcount.text = response.data.ranks[1].quantity + "/" + response.data.ranks[1].require;
|
||||||
|
SecondPrize.text = response.data.ranks[1].reward.ToString();
|
||||||
|
|
||||||
|
Thirdlevel.text = response.data.ranks[2].rank.ToString();
|
||||||
|
ThirdName.text = response.data.ranks[2].nickname;
|
||||||
|
Thirdcount.text = response.data.ranks[2].quantity + "/" + response.data.ranks[2].require;
|
||||||
|
ThirdPrize.text = response.data.ranks[2].reward.ToString();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 3; i < response.data.ranks.Count; i++)
|
for (int i = 3; i < response.data.ranks.Count; i++)
|
||||||
{
|
{
|
||||||
@ -73,6 +112,7 @@ public class Promotion_Rank : MonoBehaviour
|
|||||||
|
|
||||||
void UpdateCountdownText(float remainingTime)
|
void UpdateCountdownText(float remainingTime)
|
||||||
{
|
{
|
||||||
|
|
||||||
// 将剩余时间转换为小时、分钟和秒
|
// 将剩余时间转换为小时、分钟和秒
|
||||||
int hours = Mathf.FloorToInt(remainingTime / 3600);
|
int hours = Mathf.FloorToInt(remainingTime / 3600);
|
||||||
int minutes = Mathf.FloorToInt((remainingTime % 3600) / 60);
|
int minutes = Mathf.FloorToInt((remainingTime % 3600) / 60);
|
||||||
@ -80,17 +120,27 @@ public class Promotion_Rank : MonoBehaviour
|
|||||||
|
|
||||||
// 使用格式化字符串显示倒计时(00:00:00)
|
// 使用格式化字符串显示倒计时(00:00:00)
|
||||||
countdown.text = string.Format("{0:D2}:{1:D2}:{2:D2}", hours, minutes, seconds);
|
countdown.text = string.Format("{0:D2}:{1:D2}:{2:D2}", hours, minutes, seconds);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (remainingTime > 0)
|
if (Time.time - lastCallTime >= interval)
|
||||||
{
|
{
|
||||||
// 每帧减少剩余时间
|
// 每秒调用一次的代码
|
||||||
remainingTime -= Time.deltaTime;
|
if (remainingTime > 0)
|
||||||
|
{
|
||||||
|
remainingTime -= 1;
|
||||||
|
UpdateCountdownText(remainingTime);
|
||||||
|
Debug.Log("进入倒计时");
|
||||||
|
}
|
||||||
|
|
||||||
// 更新倒计时显示
|
// 更新上次调用时间
|
||||||
UpdateCountdownText(remainingTime);
|
lastCallTime = Time.time;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ public class FirstChargePanel : MonoBehaviour
|
|||||||
public Transform Connact;
|
public Transform Connact;
|
||||||
|
|
||||||
List<GameObject> objlist = new List<GameObject>();
|
List<GameObject> objlist = new List<GameObject>();
|
||||||
private async void OnEnable()
|
private async void Start()
|
||||||
{
|
{
|
||||||
productListResponse productListResponse = await Scene_main_jiekou.instance.ProductLists();
|
productListResponse productListResponse = await Scene_main_jiekou.instance.ProductLists();
|
||||||
for (int i = 0; i < productListResponse.Data.Count; i++)
|
for (int i = 0; i < productListResponse.Data.Count; i++)
|
||||||
|
@ -51,8 +51,8 @@ public class IllustrationsAssetDetails : MonoBehaviour
|
|||||||
isUpdating = true;
|
isUpdating = true;
|
||||||
|
|
||||||
PlayerInfoData _PlayerInfoData = await Scene_main_jiekou.instance.PlayerInfos();
|
PlayerInfoData _PlayerInfoData = await Scene_main_jiekou.instance.PlayerInfos();
|
||||||
GemText.text = _PlayerInfoData.gem.ToString();
|
GemText.text = _PlayerInfoData.gem.ToString("F2");
|
||||||
WaterText.text = _PlayerInfoData.water.ToString();
|
WaterText.text = _PlayerInfoData.water.ToString("F2");
|
||||||
UserName.text = _PlayerInfoData.nickname.ToString();
|
UserName.text = _PlayerInfoData.nickname.ToString();
|
||||||
UserID.text = _PlayerInfoData.uid.ToString();
|
UserID.text = _PlayerInfoData.uid.ToString();
|
||||||
|
|
||||||
|
@ -49,8 +49,8 @@ public class ShopAssetDetails : MonoBehaviour
|
|||||||
isUpdating = true;
|
isUpdating = true;
|
||||||
|
|
||||||
PlayerInfoData _PlayerInfoData = await Scene_main_jiekou.instance.PlayerInfos();
|
PlayerInfoData _PlayerInfoData = await Scene_main_jiekou.instance.PlayerInfos();
|
||||||
GemText .text = _PlayerInfoData.gem.ToString();
|
GemText .text = _PlayerInfoData.gem.ToString("F2");
|
||||||
OreText.text = _PlayerInfoData.forge.ToString();
|
OreText.text = _PlayerInfoData.forge.ToString("F2");
|
||||||
_PlayerInfoData = null;
|
_PlayerInfoData = null;
|
||||||
// 异步操作完成,标记为未执行
|
// 异步操作完成,标记为未执行
|
||||||
isUpdating = false;
|
isUpdating = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user