10 this._airHeight = this.airHeight + UnityEngine.Random.Range(-2f, 2f);
11 this.time = UnityEngine.Random.Range(0f, this.pingpongTime);
15 public override void OnFixedUpdate()
17 this.time += Time.fixedDeltaTime * this.flip;
18 if (this.time > this.pingpongTime)
21 this.time = this.pingpongTime;
23 else if (this.time < 0f)
28 float num = this.time - this.pingpongTime * 0.5f;
31 num = Mathf.Sqrt(num);
35 num = Mathf.Sqrt(-num) * -1f;
37 float num2 = this._airHeight + num * this.pingpongPower;
38 float num3 = base.transform.position.y;
45 this.rb.AddForce(
new Vector2(0f, this.floatPower * (1f - num3 / num2)));
50 public float airHeight = 3.5f;
53 public float floatPower = 30f;
56 public float pingpongTime = 1f;
59 public float pingpongPower = 0.15f;
62 private float _airHeight;
68 private float flip = 1f;