public bool ChangeSpeed(bool _loop, Vector2 _hit) { if (this.lerp.x >= 0.0 && this.lerp.y >= 0.0 || !this.info.speed.IsTime()) { return(false); } this.info.speed.Reset(); this.timeLerp = 0.0f; ShuffleRand shuffleRand = new ShuffleRand(-1); if (_hit.x >= 0.0) { shuffleRand.Init(100); if (this.info.rateHit > shuffleRand.Get()) { this.lerp.x = _loop ? (__Null)((double)this.centerSpeed - 1.0) : (__Null)(double)this.centerSpeed; this.lerp.y = (__Null)(double)Random.Range((float)_hit.x, (float)_hit.y); return(false); } } shuffleRand.Init(100); int valNow; do { valNow = shuffleRand.Get(); }while (GlobalMethod.RangeOn <int>(valNow, (int)(_hit.x * 100.0), (int)(_hit.y * 100.0))); this.lerp.x = _loop ? (__Null)((double)this.centerSpeed - 1.0) : (__Null)(double)this.centerSpeed; this.lerp.y = (__Null)((double)valNow * 0.00999999977648258); return(false); }
public bool IsAutoAutoLeaveItToYou( ChaControl _female, HScene.AnimationListInfo _ali, bool _isAutoLeaveItToYouButton, bool _isInitiative) { if (Object.op_Equality((Object)_female, (Object)null) || _ali == null) { return(false); } AnimatorStateInfo animatorStateInfo = _female.getAnimatorStateInfo(0); if (_isInitiative || !_isAutoLeaveItToYouButton || (!((AnimatorStateInfo) ref animatorStateInfo).IsName("Idle") || _ali.nAnimListInfoID == 3) || !this.autoLeave.time.IsTime()) { return(false); } ShuffleRand shuffleRand = new ShuffleRand(-1); shuffleRand.Init(100); bool flag = shuffleRand.Get() < this.autoLeave.rate; if (!flag) { this.autoLeave.time.minmax.x = (__Null)(double)Mathf.Max((float)(this.autoLeave.time.minmax.x - 5.0), 0.0f); this.autoLeave.time.minmax.y = (__Null)(double)Mathf.Max((float)(this.autoLeave.time.minmax.y - 5.0), 0.0f); } else { this.autoLeave.time.minmax = this.autoLeave.baseTime; } this.autoLeave.time.Reset(); return(flag); }
public bool IsChangeActionAtRestart() { ShuffleRand shuffleRand = new ShuffleRand(-1); shuffleRand.Init(100); return(shuffleRand.Get() < this.info.rateRestartMotionChange); }
public bool ChangeLoopMotion(bool _loop) { if (this.lerp.x >= 0.0 && this.lerp.y >= 0.0 || !this.info.loopChange.IsTime()) { return(false); } this.info.loopChange.Reset(); ShuffleRand shuffleRand = new ShuffleRand(-1); shuffleRand.Init(100); return(this.IsChangeLoop(_loop, this.info.rateWeakLoop < shuffleRand.Get())); }
public bool IsPull(bool _isInsert) { if (this.isPulljudge || !this.info.pull.IsTime()) { return(false); } this.info.pull.Reset(); this.isPulljudge = true; ShuffleRand shuffleRand = new ShuffleRand(-1); shuffleRand.Init(100); int num = shuffleRand.Get(); return(_isInsert ? (double)num < (double)this.info.rateInsertPull : (double)num < (double)this.info.rateNotInsertPull); }