示例#1
0
 public void PlaySound(MafiaSound sound, MafiaBufferContainer buffers)
 {
     if (selectSound)
     {
         sound.Play(buffers.Ue, null);
     }
 }
示例#2
0
 public void PlaySound(MafiaSound sound, MafiaBufferContainer buffers)
 {
     if (selectSound)
     {
         sound.Play(buffers.Ue, null);
     }
 }
示例#3
0
 public override void PlaySound(MafiaSound sound, MafiaBufferContainer buffers)
 {
     if (!ShouldPlaySound())
     {
         return;
     }
     if (jumpSound)
     {
         sound.Play(buffers.Jump, this);
     }
     if (tiunSound)
     {
         sound.Play(buffers.Tiun, this);
     }
     if (coinSound)
     {
         sound.Play(buffers.Coin, this);
         if (Game.NumCoins > 0)
         {
             sound.Play(buffers.Hyakuyen, this);
         }
         else
         {
             sound.Play(buffers.Stiana, this);
         }
     }
 }
示例#4
0
文件: ThingList.cs 项目: sinshu/mafia
 public void PlaySound(MafiaSound sound, MafiaBufferContainer buffers)
 {
     foreach (Thing thing in list)
     {
         thing.PlaySound(sound, buffers);
     }
 }
示例#5
0
 public override void PlaySound(MafiaSound sound, MafiaBufferContainer buffers)
 {
     if (fallSound)
     {
         sound.Play(buffers.Fall, this);
     }
 }
示例#6
0
文件: Spring.cs 项目: sinshu/mafia
 public override void PlaySound(MafiaSound sound, MafiaBufferContainer buffers)
 {
     if (animation == 8)
     {
         sound.Play(buffers.Spring, this);
     }
 }
示例#7
0
文件: Spring.cs 项目: sinshu/mafia
 public override void PlaySound(MafiaSound sound, MafiaBufferContainer buffers)
 {
     if (animation == 8)
     {
         sound.Play(buffers.Spring, this);
     }
 }
示例#8
0
文件: Switch.cs 项目: sinshu/mafia
 public override void PlaySound(MafiaSound sound, MafiaBufferContainer buffers)
 {
     if (!ShouldPlaySound()) return;
     if (pressSound)
     {
         sound.Play(buffers.Switch, this);
     }
 }
示例#9
0
 public override void PlaySound(MafiaSound sound, MafiaBufferContainer buffers)
 {
     if (!ShouldPlaySound())
     {
         return;
     }
     if (pressSound)
     {
         sound.Play(buffers.Switch, this);
     }
 }
示例#10
0
 public override void PlaySound(MafiaSound sound, MafiaBufferContainer buffers)
 {
     if (!ShouldPlaySound())
     {
         return;
     }
     if (moveCount == 0)
     {
         sound.Play(buffers.Lift, this);
     }
 }
示例#11
0
 public void Dispose()
 {
     StopSounds();
     if (buffers != null)
     {
         buffers.Dispose();
         buffers = null;
     }
     if (device != null)
     {
         device.Dispose();
         device = null;
     }
 }
示例#12
0
 public void Dispose()
 {
     StopSounds();
     if (buffers != null)
     {
         buffers.Dispose();
         buffers = null;
     }
     if (device != null)
     {
         device.Dispose();
         device = null;
     }
 }
示例#13
0
文件: Box.cs 项目: sinshu/mafia
 public override void PlaySound(MafiaSound sound, MafiaBufferContainer buffers)
 {
     if (!ShouldPlaySound())
     {
         return;
     }
     if (MoveCount == 1)
     {
         sound.Play(buffers.BoxMove, this);
     }
     if (LandState == ON_GROUND && prevLandState == IN_AIR)
     {
         sound.Play(buffers.BoxFall, this);
     }
 }
示例#14
0
        public MafiaSound(Form form)
        {
            try
            {
                device = new Device();
            }
            catch
            {
                return;
            }
            device.SetCooperativeLevel(form, CooperativeLevel.Priority);
            buffers = new MafiaBufferContainer(device);

            channels = new GameSoundChannel[MAX_NUM_CHANNELS];
            numChannels = 0;

            ticks = 0;
        }
示例#15
0
        public MafiaSound(Form form)
        {
            try
            {
                device = new Device();
            }
            catch
            {
                return;
            }
            device.SetCooperativeLevel(form, CooperativeLevel.Priority);
            buffers = new MafiaBufferContainer(device);

            channels    = new GameSoundChannel[MAX_NUM_CHANNELS];
            numChannels = 0;

            ticks = 0;
        }
示例#16
0
文件: Lift.cs 项目: sinshu/mafia
 public override void PlaySound(MafiaSound sound, MafiaBufferContainer buffers)
 {
     if (!ShouldPlaySound()) return;
     if (moveCount == 0)
     {
         sound.Play(buffers.Lift, this);
     }
 }
示例#17
0
文件: GameScene.cs 项目: sinshu/mafia
 public void PlaySound(MafiaSound sound, MafiaBufferContainer buffers)
 {
     things.PlaySound(sound, buffers);
 }
示例#18
0
文件: GameScene.cs 项目: sinshu/mafia
 public void PlaySound(MafiaSound sound, MafiaBufferContainer buffers)
 {
     things.PlaySound(sound, buffers);
 }
示例#19
0
文件: FallBlock.cs 项目: sinshu/mafia
 public override void PlaySound(MafiaSound sound, MafiaBufferContainer buffers)
 {
     if (fallSound)
     {
         sound.Play(buffers.Fall, this);
     }
 }
示例#20
0
文件: Player.cs 项目: sinshu/mafia
 public override void PlaySound(MafiaSound sound, MafiaBufferContainer buffers)
 {
     if (!ShouldPlaySound()) return;
     if (jumpSound)
     {
         sound.Play(buffers.Jump, this);
     }
     if (tiunSound)
     {
         sound.Play(buffers.Tiun, this);
     }
     if (coinSound)
     {
         sound.Play(buffers.Coin, this);
         if (Game.NumCoins > 0)
         {
             sound.Play(buffers.Hyakuyen, this);
         }
         else
         {
             sound.Play(buffers.Stiana, this);
         }
     }
 }
示例#21
0
文件: Thing.cs 项目: sinshu/mafia
 public abstract void PlaySound(MafiaSound sound, MafiaBufferContainer buffers);
示例#22
0
文件: ThingList.cs 项目: sinshu/mafia
 public void PlaySound(MafiaSound sound, MafiaBufferContainer buffers)
 {
     foreach (Thing thing in list)
     {
         thing.PlaySound(sound, buffers);
     }
 }
示例#23
0
 public override void PlaySound(MafiaSound sound, MafiaBufferContainer buffers)
 {
 }
示例#24
0
文件: Thing.cs 项目: sinshu/mafia
 public abstract void PlaySound(MafiaSound sound, MafiaBufferContainer buffers);
示例#25
0
文件: Door.cs 项目: sinshu/mafia
 public override void PlaySound(MafiaSound sound, MafiaBufferContainer buffers)
 {
 }
示例#26
0
文件: Box.cs 项目: sinshu/mafia
 public override void PlaySound(MafiaSound sound, MafiaBufferContainer buffers)
 {
     if (!ShouldPlaySound()) return;
     if (MoveCount == 1)
     {
         sound.Play(buffers.BoxMove, this);
     }
     if (LandState == ON_GROUND && prevLandState == IN_AIR)
     {
         sound.Play(buffers.BoxFall, this);
     }
 }