summaryrefslogtreecommitdiff
path: root/Client/Assembly-CSharp/WeatherMinigame.cs
blob: fe029761db633cc1bfda188d8315a813d88fa24c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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;
	}
}