_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/snailFactory/SuccessfulCard.cs
2024-12-09 12:00:50 +08:00

26 lines
636 B
C#

using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
using Vector3 = UnityEngine.Vector3;
public class SuccessfulCard : MonoBehaviour
{
// Start is called before the first frame update
public Image HpFill;
public FactoryItem FactoryItem;
public Text Hptext;
void Start()
{
HpFill.fillAmount = (float)(100 - (FactoryItem.settle * 2.5)) / 100;
Hptext.text = $"HP {100-FactoryItem.settle * 2.5}/100";
}
// Update is called once per frame
void Update()
{
this.transform.localScale = new Vector3(1, 1, 1);
}
}