summaryrefslogtreecommitdiff
path: root/Client/Assembly-CSharp/WeatherMinigame.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Client/Assembly-CSharp/WeatherMinigame.cs')
-rw-r--r--Client/Assembly-CSharp/WeatherMinigame.cs34
1 files changed, 34 insertions, 0 deletions
diff --git a/Client/Assembly-CSharp/WeatherMinigame.cs b/Client/Assembly-CSharp/WeatherMinigame.cs
new file mode 100644
index 0000000..fe02976
--- /dev/null
+++ b/Client/Assembly-CSharp/WeatherMinigame.cs
@@ -0,0 +1,34 @@
+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;
+ }
+}