using System; using UnityEngine; public class WeatherMinigame : Minigame { public float RefuelDuration = 5f; public VerticalGauge destGauge; private bool isDown; private float timer; public void FixedUpdate() { if (this.isDown && this.timer < 1f) { this.timer += Time.fixedDeltaTime / this.RefuelDuration; this.MyNormTask.Data[0] = (byte)Mathf.Min(255f, this.timer * 255f); if (this.timer >= 1f) { this.timer = 1f; this.MyNormTask.NextStep(); base.StartCoroutine(base.CoStartClose(0.75f)); } } this.destGauge.value = this.timer; } public void StartStopFill() { this.isDown = !this.isDown; } }