コード例 #1
0
 // Token: 0x06001790 RID: 6032 RVA: 0x00014D45 File Offset: 0x00012F45
 public void PlaySound(SoundProvider sound)
 {
     if (sound != null)
     {
         Sound.Play(sound.GetSound(null), this.Position, null);
     }
 }
コード例 #2
0
 // Token: 0x06001069 RID: 4201
 private void PerformDash(TextureAnimationWithTransitions dashAnimation, SoundProvider dashSound)
 {
     this.m_sein.Mortality.DamageReciever.ResetInviciblity();
     this.m_hasDashed = true;
     if (RandomizerBonus.DoubleAirDash() && !RandomizerBonus.DoubleAirDashUsed)
     {
         this.m_hasDashed = false;
         RandomizerBonus.DoubleAirDashUsed = true;
     }
     this.m_isOnGround    = this.m_sein.IsOnGround;
     this.m_lastDashTime  = Time.time;
     this.m_lastPressTime = 0f;
     this.SpriteRotation  = this.m_sein.PlatformBehaviour.PlatformMovement.GroundAngle;
     this.m_allowNoDecelerationForThisDash = true;
     if (this.m_chargeDashAtTarget)
     {
         this.m_faceLeft = (this.m_chargeDashDirection.x < 0f);
     }
     else if (this.m_sein.PlatformBehaviour.PlatformMovement.HasWallLeft)
     {
         this.m_faceLeft = false;
     }
     else if (this.m_sein.PlatformBehaviour.PlatformMovement.HasWallRight)
     {
         this.m_faceLeft = true;
     }
     else if (this.m_sein.Input.NormalizedHorizontal != 0)
     {
         this.m_faceLeft = (this.m_sein.Input.NormalizedHorizontal < 0);
     }
     else if (!Mathf.Approximately(this.m_sein.Speed.x, 0f))
     {
         this.m_faceLeft = (this.m_sein.Speed.x < 0f);
     }
     else
     {
         this.m_faceLeft = this.m_sein.FaceLeft;
         this.m_allowNoDecelerationForThisDash = false;
     }
     this.m_sein.FaceLeft = this.m_faceLeft;
     this.m_stopAnimation = false;
     if (dashSound)
     {
         Sound.Play(dashSound.GetSound(null), this.m_sein.Position, null);
     }
     this.m_sein.Animation.Play(dashAnimation, 154, new Func <bool>(this.KeepDashAnimationPlaying));
     if (SeinDashAttack.RainbowDashActivated)
     {
         ((GameObject)InstantiateUtility.Instantiate(this.DashFollowRainbowEffect, this.m_sein.Position, Quaternion.identity)).transform.parent = this.m_sein.Transform;
     }
     this.m_sein.PlatformBehaviour.PlatformMovement.LocalSpeedY = -this.DashDownwardSpeed;
 }