diff --git a/TheStrongestSnail/Assets/Scenes/yhjtext.unity b/TheStrongestSnail/Assets/Scenes/Kuangchang.unity similarity index 100% rename from TheStrongestSnail/Assets/Scenes/yhjtext.unity rename to TheStrongestSnail/Assets/Scenes/Kuangchang.unity diff --git a/TheStrongestSnail/Assets/Scenes/yhjtext.unity.meta b/TheStrongestSnail/Assets/Scenes/Kuangchang.unity.meta similarity index 100% rename from TheStrongestSnail/Assets/Scenes/yhjtext.unity.meta rename to TheStrongestSnail/Assets/Scenes/Kuangchang.unity.meta diff --git a/TheStrongestSnail/Assets/Scripts/lianghaoLL/TransferPre.cs b/TheStrongestSnail/Assets/Scripts/lianghaoLL/TransferPre.cs index 69246f2..4326357 100644 --- a/TheStrongestSnail/Assets/Scripts/lianghaoLL/TransferPre.cs +++ b/TheStrongestSnail/Assets/Scripts/lianghaoLL/TransferPre.cs @@ -1,3 +1,4 @@ +using System; using System.Collections; using System.Collections.Generic; using TMPro; @@ -20,9 +21,28 @@ public class TransferPre : MonoBehaviour public Sprite Sprite1bg; public Sprite Sprite2bg; // Start is called before the first frame update - void Start() + public void Init() { - + time.text = tramsfer.createTime; + + if (tramsfer.convertType == 1) + { + sp.sprite = Sprite1; + spbg.sprite = Sprite1bg; + sp2.sprite=Sprite2; + sp2bg.sprite = Sprite2bg; + count1.text = tramsfer.beansCoin.ToString("0.00"); + count2.text = tramsfer.voluteCoin.ToString("0.00"); + } + if (tramsfer.convertType == 0) + { + sp.sprite = Sprite2; + spbg.sprite = Sprite2bg; + sp2.sprite = Sprite1; + sp2bg.sprite = Sprite1bg; + count1.text = tramsfer.voluteCoin.ToString("0.00"); + count2.text = tramsfer.beansCoin.ToString("0.00"); + } } // Update is called once per frame diff --git a/TheStrongestSnail/Assets/Scripts/lianghaoLL/WalletPanel.cs b/TheStrongestSnail/Assets/Scripts/lianghaoLL/WalletPanel.cs index 5f8245c..40643c6 100644 --- a/TheStrongestSnail/Assets/Scripts/lianghaoLL/WalletPanel.cs +++ b/TheStrongestSnail/Assets/Scripts/lianghaoLL/WalletPanel.cs @@ -42,14 +42,16 @@ public class WalletPanel : MonoBehaviour ConvertPre convertPre = ob.gameObject.GetComponent(); convertPre.Convert = convert; } - foreach (var tramsfer in Wallettransfer.data.dataList) + foreach (var trams in Wallettransfer.data.dataList) { GameObject ob = Instantiate(TransferGameObject); ob.transform.parent = zhuanhuanConnect.transform; ob.transform.localScale = new Vector3(1, 1, 1); TransferPre tramsfers = ob.gameObject.GetComponent(); - tramsfers.tramsfer = tramsfer; + tramsfers.tramsfer = trams; + tramsfers.Init(); } + wokeSc.gameObject.SetActive(false); } void WoniuClick() { diff --git a/TheStrongestSnail/Assets/prefabs/YHJPrefabs/transfer.prefab b/TheStrongestSnail/Assets/prefabs/YHJPrefabs/transfer.prefab index 8983b11..615db6e 100644 --- a/TheStrongestSnail/Assets/prefabs/YHJPrefabs/transfer.prefab +++ b/TheStrongestSnail/Assets/prefabs/YHJPrefabs/transfer.prefab @@ -828,7 +828,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: fc56476aa403fdc43b2997f643ca4a7c, type: 3} m_Name: m_EditorClassIdentifier: - time: {fileID: 0} + time: {fileID: 5869714569140086322} sp: {fileID: 4501543996232953426} sp2: {fileID: 5168556073203573952} spbg: {fileID: 5017674829514617442}