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