养成基本完毕,新UI,修bug,装备初步,
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class FillValueNumber : MonoBehaviour
|
||||
{
|
||||
public Image TargetImage;
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
float amount = TargetImage.fillAmount * 100;
|
||||
gameObject.GetComponent<Text>().text = amount.ToString("F0");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user