54 lines
1.3 KiB
C#
54 lines
1.3 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class TransferPre : MonoBehaviour
|
|
{
|
|
public Tramsfer tramsfer;
|
|
public Text time;
|
|
//ͼ±ê
|
|
public Image sp;
|
|
public Image sp2;
|
|
public Image spbg;
|
|
public Image sp2bg;
|
|
public TextMeshProUGUI count1;
|
|
public TextMeshProUGUI count2;
|
|
public Sprite Sprite1;
|
|
public Sprite Sprite2;
|
|
public Sprite Sprite1bg;
|
|
public Sprite Sprite2bg;
|
|
// Start is called before the first frame update
|
|
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
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|