示例#1
0
        protected override void OnSimulation(int time)
        {
            SoundEvent?.Invoke(this, SoundEventArgs);
            ApplyGravity();
            ApplyHorizontalFriction(Const.ACCEL_F_AIR);
            ApplyVerticalFriction(Const.ACCEL_F_AIR);

            base.OnSimulation(time);
        }
示例#2
0
        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);
        }
示例#3
0
 public void PullDown()
 {
     pulling = true;
     SoundEventArgs.SetMethodCalled();
     SoundEvent?.Invoke(this, SoundEventArgs);
 }
示例#4
0
 protected override void OnSimulation(int time)
 {
     SoundEvent?.Invoke(this, SoundEventArgs);
     base.OnSimulation(time);
 }
示例#5
0
 protected override void OnUpdate(int time)
 {
     SoundEvent?.Invoke(this, SoundEventArgs);
     state.Update(time);
 }
示例#6
0
 /// <summary>Вспомогательный метод для вызова события звука</summary>
 /// <param name="sound"></param>
 private void OnSound(SoundEnum sound) => SoundEvent?.Invoke(this, sound);