Thread:Hua Ja Frol/@comment-35185860-20180710165114/@comment-33319614-20180716045007



using System; using UnityEngine; using UnityEngine.UI;

// Token: 0x0200000F RID: 15 public class JumpRopeScript : MonoBehaviour { // Token: 0x0600003C RID: 60 RVA: 0x00003E10 File Offset: 0x00002010 private void OnEnable { this.jumpDelay = 1f; this.ropeHit = true; this.jumpStarted = false; this.jumps = 0; this.jumpCount.text = 0 + "/10"; this.playtime.audioDevice.PlayOneShot(this.playtime.aud_ReadyGo); }

// Token: 0x0600003D RID: 61 RVA: 0x00003E74 File Offset: 0x00002074 private void Update { if (!ModMenu.characterEvents[1]) { this.ps.DeactivateJumpRope; return; } if (this.jumpDelay > 0f) { this.jumpDelay -= Time.deltaTime; } else if (!this.jumpStarted) { this.jumpStarted = true; this.ropePosition = 1f; this.rope.SetTrigger("ActivateJumpRope"); this.ropeHit = false; } if (this.ropePosition > 0f) { this.ropePosition -= Time.deltaTime; return; } if (!this.ropeHit) { this.RopeHit; } }

// Token: 0x0600003E RID: 62 RVA: 0x000022DD File Offset: 0x000004DD private void RopeHit { this.ropeHit = true; if (this.cs.jumpHeight <= 0.2f) { this.Fail; } else { this.Success; } this.jumpStarted = false; }

// Token: 0x0600003F RID: 63 RVA: 0x00003F18 File Offset: 0x00002118 private void Success { this.playtime.audioDevice.Stop; this.playtime.audioDevice.PlayOneShot(this.playtime.aud_Numbers[this.jumps]); this.jumps++; this.jumpCount.text = this.jumps + "/10"; this.jumpDelay = 0.5f; if (this.jumps >= 10) { this.playtime.audioDevice.Stop; this.playtime.audioDevice.PlayOneShot(this.playtime.aud_Congrats); this.ps.DeactivateJumpRope; } }

// Token: 0x06000040 RID: 64 RVA: 0x00003FD0 File Offset: 0x000021D0 private void Fail { this.jumps = 0; this.jumpCount.text = this.jumps + "/5"; this.jumpDelay = 2f; this.playtime.audioDevice.PlayOneShot(this.playtime.aud_Oops); }

// Token: 0x04000046 RID: 70 public Text jumpCount;

// Token: 0x04000047 RID: 71 public Animator rope;

// Token: 0x04000048 RID: 72 public CameraScript cs;

// Token: 0x04000049 RID: 73 public PlayerScript ps;

// Token: 0x0400004A RID: 74 public PlaytimeScript playtime;

// Token: 0x0400004B RID: 75 public int jumps;

// Token: 0x0400004C RID: 76 public float jumpDelay;

// Token: 0x0400004D RID: 77 public float ropePosition;

// Token: 0x0400004E RID: 78 public bool ropeHit;

// Token: 0x0400004F RID: 79 public bool jumpStarted; }