40 lines
629 B
C#
40 lines
629 B
C#
using System.Collections;
|
|
using UnityEngine;
|
|
|
|
public class UniStormTest : MonoBehaviour
|
|
{
|
|
public float changeTimeSpeed = 1f;
|
|
|
|
private UniStormWeatherSystem_C uniStormSystem;
|
|
|
|
private void Awake()
|
|
{
|
|
uniStormSystem = base.gameObject.GetComponent<UniStormWeatherSystem_C>();
|
|
}
|
|
|
|
private void Start()
|
|
{
|
|
StartCoroutine(ChangeTime());
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
}
|
|
|
|
public IEnumerator ChangeTime()
|
|
{
|
|
while (true)
|
|
{
|
|
yield return new WaitForSeconds(changeTimeSpeed);
|
|
if (uniStormSystem.startTime == 23f)
|
|
{
|
|
uniStormSystem.startTime = 0f;
|
|
}
|
|
else
|
|
{
|
|
uniStormSystem.startTime += 1f;
|
|
}
|
|
}
|
|
}
|
|
}
|