// Token: 0x060011D1 RID: 4561 RVA: 0x00069FDC File Offset: 0x000681DC private void PerformCrouchJump() { bool flag = false; List<Collider> groundColliders = this.Sein.PlatformBehaviour.PlatformMovementListOfColliders.GroundColliders; for (int i = 0; i < groundColliders.Count; i++) { Collider component = groundColliders[i]; if (component.GetComponentInParents<GoThroughPlatform>() && this.Sein.GetComponent<GoThroughPlatformHandler>().FallThroughPlatform()) { this.Sein.PlatformBehaviour.PlatformMovement.LocalSpeedX = 0f; this.Sein.PlatformBehaviour.PlatformMovement.LocalSpeedY = 0f; this.Sein.PlatformBehaviour.PlatformMovement.Ground.FutureOn = false; this.Sein.PlatformBehaviour.PlatformMovement.Ground.IsOn = false; this.Sein.PlatformBehaviour.PlatformMovement.Ground.WasOn = false; flag = true; } } if (!flag) { this.PlatformMovement.LocalSpeedY = this.CalculateSpeedFromHeight(this.CrouchJumpHeight); this.PlatformMovement.LocalSpeedX = (float)((!this.CharacterSpriteMirror.FaceLeft) ? -3 : 3); this.Sein.PlatformBehaviour.AirNoDeceleration.NoDeceleration = true; CharacterAnimationSystem.CharacterAnimationState characterAnimationState = this.Sein.PlatformBehaviour.Visuals.Animation.Play(this.CrouchJumpAnimation, 10, new Func<bool>(this.ShouldBackflipAnimationKeepPlaying)); characterAnimationState.OnStartPlaying = new Action(this.OnAnimationStart); characterAnimationState.OnStopPlaying = new Action(this.OnAnimationEnd); } }
// Token: 0x060011D0 RID: 4560 RVA: 0x00069F30 File Offset: 0x00068130 private void PerformWallSlideJump() { CharacterAnimationSystem.CharacterAnimationState characterAnimationState = this.Sein.PlatformBehaviour.Visuals.Animation.Play(this.WallSlideJumpAnimation, 24, new Func<bool>(this.ShouldWallSlideJumpAnimationKeepPlaying)); characterAnimationState.OnStartPlaying = null; characterAnimationState.OnStopPlaying = new Action(this.OnAnimationEnd); this.PlatformMovement.LocalSpeedY = this.CalculateSpeedFromHeight(this.FirstJumpHeight); if (this.Sein.PlatformBehaviour.JumpSustain) { this.Sein.PlatformBehaviour.JumpSustain.SetAmountOfSpeedToLose(this.PlatformMovement.LocalSpeedY, 1f); } }
// Token: 0x060011C5 RID: 4549 RVA: 0x000695D4 File Offset: 0x000677D4 public void PerformTurnAroundBackFlipJump() { this.PlatformMovement.LocalSpeedY = this.CalculateSpeedFromHeight(this.BackflipJumpHeight); this.Sein.PlatformBehaviour.AirNoDeceleration.NoDeceleration = true; if (this.Sein.PlatformBehaviour.JumpSustain) { this.Sein.PlatformBehaviour.JumpSustain.SetAmountOfSpeedToLose(this.PlatformMovement.LocalSpeedY * 0.5f, 1f); } CharacterAnimationSystem.CharacterAnimationState characterAnimationState = this.Sein.PlatformBehaviour.Visuals.Animation.Play(this.BackflipAnimation, 10, new Func<bool>(this.ShouldBackflipAnimationKeepPlaying)); characterAnimationState.OnStartPlaying = new Action(this.OnAnimationStart); characterAnimationState.OnStopPlaying = new Action(this.OnAnimationEnd); }
// Token: 0x060011CF RID: 4559 RVA: 0x00069E4C File Offset: 0x0006804C private void PerformThirdIldleJump() { CharacterAnimationSystem.CharacterAnimationState characterAnimationState = this.Sein.PlatformBehaviour.Visuals.Animation.Play(this.JumpIdleAnimation[2], 10, new Func<bool>(this.ShouldJumpIdleAnimationKeepPlaying)); characterAnimationState.OnStartPlaying = null; characterAnimationState.OnStopPlaying = new Action(this.OnAnimationEnd); this.PlatformMovement.LocalSpeedY = this.CalculateSpeedFromHeight(this.ThirdJumpHeight); if (this.Sein.PlatformBehaviour.JumpSustain) { this.Sein.PlatformBehaviour.JumpSustain.SetAmountOfSpeedToLose(this.PlatformMovement.LocalSpeedY, 1f); } Sound.Play(this.SpinJumpSoundProvider.GetSoundForMaterial(this.m_currentJumpingMaterial, null), this.Sein.PlatformBehaviour.PlatformMovement.Position, null); this.m_jumpIdleNumber = 0; }
// Token: 0x060011CB RID: 4555 RVA: 0x00069B30 File Offset: 0x00067D30 public void PerformThirdRunningJump() { Vector2 localSpeed = this.PlatformMovement.LocalSpeed; localSpeed.y = this.CalculateSpeedFromHeight(this.ThirdJumpHeight); this.PlatformMovement.LocalSpeed = localSpeed; this.CacheDelegates(); CharacterAnimationSystem.CharacterAnimationState characterAnimationState = this.Sein.PlatformBehaviour.Visuals.Animation.Play(this.JumpAnimation[2], 10, this.m_shouldJumpMoving); characterAnimationState.OnStartPlaying = null; characterAnimationState.OnStopPlaying = this.onAnimationEnd; if (this.Sein.PlatformBehaviour.JumpSustain) { this.Sein.PlatformBehaviour.JumpSustain.SetAmountOfSpeedToLose(this.PlatformMovement.LocalSpeedY * 0.5f, 1f); } Sound.Play(this.SpinJumpSoundProvider.GetSoundForMaterial(this.m_currentJumpingMaterial, null), this.Sein.PlatformBehaviour.PlatformMovement.Position, null); this.m_runningJumpNumber = 0; }
// Token: 0x06000FA9 RID: 4009 RVA: 0x0005F208 File Offset: 0x0005D408 public void JumpOffTarget(float angle) { if (GameController.Instance) { GameController.Instance.ResumeGameplay(); } Vector2 vector = Quaternion.Euler(0f, 0f, angle) * Vector2.up; Vector2 vector2 = vector * this.BashVelocity; this.PlatformMovement.WorldSpeed = vector2; this.AirNoDeceleration.NoDeceleration = true; this.Sein.ResetAirLimits(); this.m_frictionTimeRemaining = this.FrictionDuration; this.ApplyFrictionToSpeed.SpeedToSlowDown = this.PlatformMovement.LocalSpeed; this.MovePlayerToTargetAndCreateEffect(); Component component = this.Target as Component; Vector3 position = (!InstantiateUtility.IsDestroyed(component)) ? component.transform.position : this.Sein.Position; GameObject gameObject = (GameObject)InstantiateUtility.Instantiate(this.BashOffFx); gameObject.transform.position = position; Vector3 localScale = gameObject.transform.localScale; localScale.x = vector2.magnitude * 0.1f; gameObject.transform.localScale = localScale; gameObject.transform.localRotation = Quaternion.Euler(0f, 0f, MoonMath.Angle.AngleFromVector(vector)); if (this.BashReleaseEffect) { GameObject gameObject2 = (GameObject)InstantiateUtility.Instantiate(this.BashReleaseEffect); gameObject2.transform.position = position; } SeinBashAttack.OnBashAttackEvent(vector2); this.m_timeRemainingTillNextBash = this.DelayTillNextBash; CharacterAnimationSystem.CharacterAnimationState characterAnimationState = this.Sein.PlatformBehaviour.Visuals.Animation.Play(this.BashJumpAnimation, 10, new Func <bool>(this.ShouldBashJumpAnimationKeepPlaying)); characterAnimationState.OnStartPlaying = new Action(this.OnAnimationStart); characterAnimationState.OnStopPlaying = new Action(this.OnAnimationEnd); this.Sein.PlatformBehaviour.Visuals.SpriteMirror.FaceLeft = (vector2.x > 0f); if (this.Sein.Abilities.Swimming) { this.Sein.Abilities.Swimming.OnBash(angle); } }
// Token: 0x0600124B RID: 4683 RVA: 0x00069BA4 File Offset: 0x00067DA4 public void PerformChargeJump() { float chargedJumpStrength = this.ChargedJumpStrength + this.ChargedJumpStrength * 0.08f * (float)(RandomizerBonus.Velocity() + RandomizerBonus.Jumpgrades()); this.PlatformMovement.LocalSpeedX = chargedJumpStrength * this.Arrow.transform.right.x; this.PlatformMovement.LocalSpeedY = chargedJumpStrength * this.Arrow.transform.right.y; Vector2 normalized = this.m_sein.PlatformBehaviour.PlatformMovement.LocalSpeed.normalized; this.m_angleDirection = Mathf.Atan2(normalized.y, Mathf.Abs(normalized.x)) * 57.29578f * (float)((normalized.x >= 0f) ? 1 : -1); Sound.Play(this.JumpSound.GetSound(null), this.m_sein.PlatformBehaviour.PlatformMovement.Position, null); this.m_sein.Mortality.DamageReciever.MakeInvincibleToEnemies(this.AntiGravityDuration); this.ChangeState(SeinWallChargeJump.State.Jumping); this.m_sein.FaceLeft = (this.PlatformMovement.LocalSpeedX < 0f); CharacterAnimationSystem.CharacterAnimationState characterAnimationState = this.m_sein.PlatformBehaviour.Visuals.Animation.Play(this.JumpAnimation, 10, new Func <bool>(this.ShouldChargeJumpAnimationKeepPlaying)); characterAnimationState.OnStartPlaying = new Action(this.OnAnimationStart); characterAnimationState.OnStopPlaying = new Action(this.OnAnimationEnd); this.m_sein.PlatformBehaviour.Visuals.SpriteRotater.BeginTiltUpDownInAir(1.5f); if (this.m_sein.Abilities.Glide) { this.m_sein.Abilities.Glide.NeedsRightTriggerReleased = true; } JumpFlipPlatform.OnSeinChargeJumpEvent(); this.m_sein.Abilities.ChargeJumpCharging.EndCharge(); }
// Token: 0x06001276 RID: 4726 RVA: 0x0006C760 File Offset: 0x0006A960 public IEnumerator RoutineForMegWhoPlaysMarioAndSucksAtWallJumping() { float i = (float)this.Sein.Input.NormalizedHorizontal; bool left = i < 0f; yield return(new WaitForFixedUpdate()); yield return(new WaitForFixedUpdate()); for (float t = 0f; t < 0.2f; t += Time.deltaTime) { if (Core.Input.Jump.OnPressed) { break; } if (this.PlatformMovement.IsOnWall) { break; } if ((float)this.Sein.Input.NormalizedHorizontal == -i) { this.PlatformMovement.LocalSpeedX = this.JumpStrength.x * RandomizerBonus.Jumpscale * (float)((!left) ? -1 : 1); this.CharacterSpriteMirror.FaceLeft = !left; CharacterAnimationSystem.CharacterAnimationState state = this.Sein.PlatformBehaviour.Visuals.Animation.PlayRandom(this.AwayAnimation, 10, new Func <bool>(this.ShouldKeepPlayingWallJumpLeftAwayAnimation)); state.OnStopPlaying = new Action(this.OnAnimationEnd); state.OnStartPlaying = new Action(this.OnAnimationStart); if (this.DoubleJump) { this.DoubleJump.ResetLock(); } break; } yield return(new WaitForFixedUpdate()); } yield break; }
// Token: 0x0600127E RID: 4734 RVA: 0x0006C838 File Offset: 0x0006AA38 public void PerformWallJumpRight() { if (this.m_hasWallJumpedRight) { return; } if (this.DontAllowJumpingTowardsWall && this.LeftRightMovement.BaseHorizontalInput < 0f) { return; } if (this.LeftRightMovement.BaseHorizontalInput < 0f && this.DoubleJump) { this.DoubleJump.LockForDuration(this.LockDoubleJumpTowardsDuration); } if (this.LimitWallJumping) { this.m_hasWallJumpedRight = true; } this.m_hasWallJumpedLeft = false; this.PlatformMovement.LocalSpeedX = this.JumpStrength.x * RandomizerBonus.Jumpscale; this.PlatformMovement.LocalSpeedY = this.JumpStrength.y * RandomizerBonus.Jumpscale; Vector2 localSpeed = this.PlatformMovement.LocalSpeed; this.ApplyImpulseToWall(localSpeed); if (this.Sein.Input.NormalizedHorizontal > 0) { this.CharacterSpriteMirror.FaceLeft = false; CharacterAnimationSystem.CharacterAnimationState characterAnimationState = this.Sein.PlatformBehaviour.Visuals.Animation.PlayRandom(this.AwayAnimation, 10, new Func <bool>(this.ShouldKeepPlayingWallJumpRightAwayAnimation)); characterAnimationState.OnStopPlaying = new Action(this.OnAnimationEnd); characterAnimationState.OnStartPlaying = new Action(this.OnAnimationStart); } else if (this.Sein.Input.NormalizedHorizontal < 0) { Vector3 origin = this.PlatformMovement.Position + Vector3.up * 2f; float maxDistance = this.PlatformMovement.CapsuleCollider.radius + 2f; Ray ray = new Ray(origin, this.PlatformMovement.LocalToWorld(Vector3.left)); if (Physics.Raycast(ray, maxDistance)) { CharacterAnimationSystem.CharacterAnimationState characterAnimationState2 = this.Sein.PlatformBehaviour.Visuals.Animation.PlayRandom(this.TowardsAnimation, 10, new Func <bool>(this.ShouldKeepPlayingWallJumpRightTowardsAnimation)); characterAnimationState2.OnStopPlaying = new Action(this.OnAnimationEnd); base.StartCoroutine(this.RoutineForMegWhoPlaysMarioAndSucksAtWallJumping()); } else { CharacterAnimationSystem.CharacterAnimationState characterAnimationState3 = this.Sein.PlatformBehaviour.Visuals.Animation.PlayRandom(this.EdgeJumpAnimation, 10, new Func <bool>(this.ShouldKeepPlayingWallJumpRightTowardsAnimation)); characterAnimationState3.OnStopPlaying = new Action(this.OnAnimationEnd); localSpeed.y = 0f; } } else { CharacterAnimationSystem.CharacterAnimationState characterAnimationState4 = this.Sein.PlatformBehaviour.Visuals.Animation.PlayRandom(this.RegularAnimation, 10, new Func <bool>(this.ShouldKeepPlayingWallJumpRightRegularAnimation)); characterAnimationState4.OnStopPlaying = new Action(this.OnAnimationEnd); characterAnimationState4.OnStartPlaying = new Action(this.OnAnimationStart); } Sound.Play(this.WallJumpSound.GetSoundForMaterial(this.Sein.PlatformBehaviour.WallSurfaceMaterialType, null), this.Sein.PlatformBehaviour.PlatformMovement.Position, null); this.OnWallJumpEvent(localSpeed); if (this.Sein.PlatformBehaviour.JumpSustain) { this.Sein.PlatformBehaviour.JumpSustain.SetAmountOfSpeedToLose(localSpeed.y, 1f); } this.Sein.PlatformBehaviour.AirNoDeceleration.NoDeceleration = true; this.Sein.ResetAirLimits(); JumpFlipPlatform.OnSeinWallJumpEvent(); }