钱包转换

This commit is contained in:
杨号敬 2024-12-11 16:59:08 +08:00
parent 05bd1797f0
commit 902edf944e
5 changed files with 27 additions and 5 deletions

View File

@ -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

View File

@ -42,14 +42,16 @@ public class WalletPanel : MonoBehaviour
ConvertPre convertPre = ob.gameObject.GetComponent<ConvertPre>();
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<TransferPre>();
tramsfers.tramsfer = tramsfer;
tramsfers.tramsfer = trams;
tramsfers.Init();
}
wokeSc.gameObject.SetActive(false);
}
void WoniuClick()
{

View File

@ -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}