You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
635 B

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class JDT : MonoBehaviour
{
Image image;
public float timescalx = 3;
public float max=1;
public float min = 0;
float time = 0;
private void Start()
{
image=transform.GetChild(0).GetComponent<Image>();
image.fillAmount = 0;
}
// Update is called once per frame
void Update()
{
if (image.fillAmount >= 1f) return;
time += Time.deltaTime;
if (time >= timescalx) {
time = 0;
image.fillAmount += 0.01f;
}
}
}