_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/snailFactory/SuccessfulCard.cs

26 lines
636 B
C#
Raw Normal View History

2024-12-08 20:16:04 +08:00
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()
{
2024-12-09 12:00:50 +08:00
HpFill.fillAmount = (float)(100 - (FactoryItem.settle * 2.5)) / 100;
Hptext.text = $"HP {100-FactoryItem.settle * 2.5}/100";
2024-12-08 20:16:04 +08:00
}
// Update is called once per frame
void Update()
{
this.transform.localScale = new Vector3(1, 1, 1);
}
}