41 lines
880 B
C#
41 lines
880 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
using UnityEngine.UI;
|
|
public class YiCHongShiJian : MonoBehaviour
|
|
{
|
|
public GameObject SpeedText3;
|
|
public GameObject SpeedText4;
|
|
public GameObject NextScene;
|
|
|
|
|
|
|
|
float YichongShiJian = 0;
|
|
int CurrentShiJian = 0;
|
|
int CurrentShiJian1 = 0;
|
|
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
YichongShiJian += Time.deltaTime;
|
|
if (YichongShiJian > 1)
|
|
{ CurrentShiJian += 1;
|
|
// CurrentShiJian1 += 1;
|
|
this.GetComponent<Text>().text = CurrentShiJian.ToString() + " min";
|
|
if (CurrentTime.Current_Battery < 94)
|
|
{
|
|
CurrentTime.Current_Battery += 5f;
|
|
|
|
}
|
|
YichongShiJian = 0;
|
|
}
|
|
}
|
|
private void OnEnable()
|
|
{
|
|
CurrentShiJian = 0;
|
|
}
|
|
|
|
}
|