22 lines
472 B
C#
22 lines
472 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
public class null_barttery : MonoBehaviour
|
|
{
|
|
public Text bettery;
|
|
float current=85f;
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{ if(current>1)
|
|
current -= 0.05f*Time.deltaTime;
|
|
bettery.text = current.ToString("f0")+"%";
|
|
}
|
|
}
|