Example #1
0
 public void Defeat()
 {
     SoundEventArgs.SetMethodCalled();
     ScorePoints(Const.SCORE_GOOMBA);
     World.Add(new PopingUpPoints(World, Boundary.Location, Const.SCORE_GOOMBA));
     State.Defeat();
 }
Example #2
0
 private void OnSoundEffect(object sender, SoundEventArgs e)
 {
     if (!this.checkBoxAudio.Checked)
     {
         return;
     }
     this.soundPlayer.Stream = e.AudioStream;
     this.soundPlayer.Play();
 }
        private void OnPlaySound(object sender, SoundEventArgs e)
        {
            if (!Settings.Subtitles.Enable || e.AudioSourceMgr.SoundType < AudioSourceMgr.Type.Voice)
                return;

            Logger.WriteLine(ResourceType.Voices, $"Voices {e.AudioSourceMgr.FileName}");

            Subtitles.DisplayFor(e.AudioSourceMgr);
        }
Example #4
0
 public void Collect()
 {
     if (!collected)
     {
         collected = true;
         SoundEventArgs.SetMethodCalled();
         HandlerCoins?.Invoke(this, coinEventInfo);
         ScorePoints(Const.SCORE_COIN);
         World.Add(new PopingUpPoints(World, Boundary.Location, Const.SCORE_COIN));
     }
     RemoveSelf();
     //State.Collect();
 }
Example #5
0
 public void Action()
 {
     //    if (animation != Animation.none)
     //    {
     //        return;
     //    }
     if (PowerUpState is Fire)
     {
         SoundEventArgs.SetMethodCalled();
         bool facingRight = Facing is FacingMode.right;
         World.Add(new FireBall(World, Boundary.Location, null, facingRight));
     }
 }
Example #6
0
 public void NormalCreate()
 {
     if (PowerUpState != null || PowerUpState is Standard)
     {
         return;
     }
     SoundEventArgs.SetMethodCalled();
     PowerUpState.Downgrade();
     if (PowerUpState is Fire)
     {
         PowerUpState.Downgrade();
     }
 }
Example #7
0
        public void Jump()
        {
            if (animation == Animation.none)
            {
                MovementState.Jump();

                if (MovementState is Jumping jumping && !jumping.Finished)
                {
                    SoundEventArgs.SetMethodCalled();
                    userInput.Y -= Const.ACCEL_INPUT_Y + Const.ACCEL_G;
                }
            }
        }
Example #8
0
 protected override void OnSimulation(int time)
 {
     if (onFloor)
     {
         SetVerticalVelocity(-Const.VELOCITY_RISING_THWOMP);
     }
     else if (!onFloor && DetectMario())
     {
         ApplyGravity();
         SoundEventArgs.SetMethodCalled();
     }
     else
     {
         // Do nothing
     }
     base.OnSimulation(time);
 }
Example #9
0
 public void PullDown()
 {
     pulling = true;
     SoundEventArgs.SetMethodCalled();
     SoundEvent?.Invoke(this, SoundEventArgs);
 }
Example #10
0
 public void Bump(Mario mario)
 {
     SoundEventArgs.SetMethodCalled();
     State.Bump(mario);
 }
Example #11
0
 public void OnDestroy()
 {
     SoundEventArgs.SetMethodCalled();
     ScorePoints(Const.SCORE_BRICK);
 }
Example #12
0
 public void UpgradeToFire()
 {
     SoundEventArgs.SetMethodCalled();
     PowerUpState.UpgradeToFire();
 }
Example #13
0
 public void OnDeath()
 {
     SoundEventArgs.SetMethodCalled();
     SetVerticalVelocity(-20);
 }
Example #14
0
 public void SuperCreate()
 {
     SoundEventArgs.SetMethodCalled();
     PowerUpState.UpgradeToSuper();
 }