protected override void OnSimulation(int time) { SoundEvent?.Invoke(this, SoundEventArgs); ApplyGravity(); ApplyHorizontalFriction(Const.ACCEL_F_AIR); ApplyVerticalFriction(Const.ACCEL_F_AIR); base.OnSimulation(time); }
protected override void OnSimulation(int time) { ApplyGravity(); if (Facing == FacingMode.left) { SetHorizontalVelocity(-Const.VELOCITY_GOOMBA); } else { SetHorizontalVelocity(Const.VELOCITY_GOOMBA); } SoundEvent?.Invoke(this, SoundEventArgs); base.OnSimulation(time); }
public void PullDown() { pulling = true; SoundEventArgs.SetMethodCalled(); SoundEvent?.Invoke(this, SoundEventArgs); }
protected override void OnSimulation(int time) { SoundEvent?.Invoke(this, SoundEventArgs); base.OnSimulation(time); }
protected override void OnUpdate(int time) { SoundEvent?.Invoke(this, SoundEventArgs); state.Update(time); }
/// <summary>Вспомогательный метод для вызова события звука</summary> /// <param name="sound"></param> private void OnSound(SoundEnum sound) => SoundEvent?.Invoke(this, sound);