Esempio n. 1
0
 public void Defeat()
 {
     SoundEventArgs.SetMethodCalled();
     ScorePoints(Const.SCORE_GOOMBA);
     World.Add(new PopingUpPoints(World, Boundary.Location, Const.SCORE_GOOMBA));
     State.Defeat();
 }
Esempio n. 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);
        }
Esempio n. 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();
 }
Esempio n. 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));
     }
 }
Esempio n. 6
0
 public void NormalCreate()
 {
     if (PowerUpState != null || PowerUpState is Standard)
     {
         return;
     }
     SoundEventArgs.SetMethodCalled();
     PowerUpState.Downgrade();
     if (PowerUpState is Fire)
     {
         PowerUpState.Downgrade();
     }
 }
Esempio n. 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;
                }
            }
        }
Esempio n. 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);
 }
Esempio n. 9
0
 public void PullDown()
 {
     pulling = true;
     SoundEventArgs.SetMethodCalled();
     SoundEvent?.Invoke(this, SoundEventArgs);
 }
Esempio n. 10
0
 public void Bump(Mario mario)
 {
     SoundEventArgs.SetMethodCalled();
     State.Bump(mario);
 }
Esempio n. 11
0
 public void OnDestroy()
 {
     SoundEventArgs.SetMethodCalled();
     ScorePoints(Const.SCORE_BRICK);
 }
Esempio n. 12
0
 public void UpgradeToFire()
 {
     SoundEventArgs.SetMethodCalled();
     PowerUpState.UpgradeToFire();
 }
Esempio n. 13
0
 public void OnDeath()
 {
     SoundEventArgs.SetMethodCalled();
     SetVerticalVelocity(-20);
 }
Esempio n. 14
0
 public void SuperCreate()
 {
     SoundEventArgs.SetMethodCalled();
     PowerUpState.UpgradeToSuper();
 }