29 lines
610 B
C#
29 lines
610 B
C#
|
using DG.Tweening;
|
||
|
using Sirenix.OdinInspector;
|
||
|
using TMPro;
|
||
|
using UnityEngine;
|
||
|
|
||
|
namespace BlueWater.Uis
|
||
|
{
|
||
|
public class PayMoneyUi : MonoBehaviour
|
||
|
{
|
||
|
[SerializeField, Required]
|
||
|
private DOTweenAnimation _moveAnimation;
|
||
|
|
||
|
[SerializeField, Required]
|
||
|
private TMP_Text _goldText;
|
||
|
|
||
|
private void OnDestroy()
|
||
|
{
|
||
|
_moveAnimation.DOKill();
|
||
|
}
|
||
|
|
||
|
public void PayMoney(int gold)
|
||
|
{
|
||
|
gameObject.SetActive(true);
|
||
|
_moveAnimation.DORestart();
|
||
|
|
||
|
_goldText.text = gold.ToString("N0");
|
||
|
}
|
||
|
}
|
||
|
}
|