diff options
Diffstat (limited to 'Client/Assembly-CSharp/SteamBehaviour.cs')
-rw-r--r-- | Client/Assembly-CSharp/SteamBehaviour.cs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Client/Assembly-CSharp/SteamBehaviour.cs b/Client/Assembly-CSharp/SteamBehaviour.cs new file mode 100644 index 0000000..515d641 --- /dev/null +++ b/Client/Assembly-CSharp/SteamBehaviour.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections; +using PowerTools; +using UnityEngine; + +public class SteamBehaviour : MonoBehaviour +{ + public SpriteAnim anim; + + public FloatRange PlayRate = new FloatRange(0.5f, 1f); + + public void OnEnable() + { + base.StartCoroutine(this.Run()); + } + + private IEnumerator Run() + { + for (;;) + { + float time = this.PlayRate.Next(); + while (time > 0f) + { + time -= Time.deltaTime; + yield return null; + } + this.anim.Play(null, 1f); + while (this.anim.IsPlaying(null)) + { + yield return null; + } + } + yield break; + } +} |