// Token: 0x06000FA7 RID: 4007 RVA: 0x0005F2AC File Offset: 0x0005D4AC public void BeginBash() { this.m_timeRemainingOfBashButtonPress = 0f; this.IsBashing = true; this.Target.OnEnterBash(); Transform transform = this.TargetAsComponent.transform; Sound.Play((!this.Sein.PlayerAbilities.BashBuff.HasAbility) ? this.BashStartSound.GetSound(null) : this.UpgradedBashStartSound.GetSound(null), this.m_seinTransform.position, null); if (GameController.Instance) { GameController.Instance.SuspendGameplay(); } if (UI.Cameras.Current != null) { SuspensionManager.GetSuspendables(this.m_bashSuspendables, UI.Cameras.Current.GameObject); SuspensionManager.Resume(this.m_bashSuspendables); this.m_bashSuspendables.Clear(); } this.PlatformMovement.LocalSpeed = Vector2.zero; GameObject gameObject = (GameObject)InstantiateUtility.Instantiate(this.BashAttackGamePrefab); this.m_bashAttackGame = gameObject.GetComponent <BashAttackGame>(); this.m_bashAttackGame.SendDirection(transform.position - this.PlatformMovement.Position); this.m_bashAttackGame.BashGameComplete += this.BashGameComplete; this.m_bashAttackGame.transform.position = transform.position; Vector3 b = Vector3.ClampMagnitude(transform.position - this.PlatformMovement.Position, 2f); this.m_playerTargetPosition = transform.position - b; this.m_directionToTarget = b.normalized; SeinBashAttack.OnBashBegin(); this.Sein.PlatformBehaviour.Visuals.Animation.PlayLoop(this.BashChargeAnimation, 10, new Func <bool>(this.ShouldBashChargeAnimationKeepPlaying), false); }
// Token: 0x06000FAB RID: 4011 RVA: 0x0005F690 File Offset: 0x0005D890 public void AttackTarget() { Component component = this.Target as Component; if (!InstantiateUtility.IsDestroyed(component)) { Vector2 force = -MoonMath.Angle.VectorFromAngle(this.m_bashAngle + 90f) * (4f + (float)RandomizerBonus.Velocity()); new Damage(RandomizerBonusSkill.AbilityDamage((!this.Sein.PlayerAbilities.BashBuff.HasAbility) ? this.Damage : this.UpgradedDamage), force, Characters.Sein.Position, DamageType.Bash, base.gameObject).DealToComponents(component.gameObject); EntityTargetting component2 = component.gameObject.GetComponent <EntityTargetting>(); if (component2 && component2.Entity is Enemy) { SeinBashAttack.OnBashEnemy(component2); } if (this.Sein.PlayerAbilities.BashBuff.HasAbility) { this.BeginBashThroughEnemies(); } } }
// 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); } }