Files
youlegames/codes/games/client/Projects/majiang_jx/js/flow/sound.js
2026-02-04 23:47:45 +08:00

50 lines
1.5 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
d.bet_sound = function (sound) {
var sound = d.c(sound);
var sound_num = sound[1];
var seat = sound[0];
if (sound_num != undefined && String(sound_num).length > 0 && sound_num > -1) {
//if(seat!=C_Player.seat || seat==C_Player.seat && sound_num==101)
{
sound_num = parseInt(sound_num);
// var t = new Date().getTime() + d.time_dif;
// var t0 = sound[2];
// if (t - t0 > 8 * 1000 && d.replay == 0) {
// return;
// }
//d.wav[0]=22;//发出声音的最大时间=0之后播其他声音以免2个声音同时播
var sex = Desk.PlayerList[seat].sex || 1;//1男2女
if(sex==0){
sex=2;
}
if (sound_num < 60) {
var sid = 60 + (sex - 1) * 60 + sound_num;
}
else {
var sid = 50 + (sex - 1) * 60 + (sound_num - 100);
}
if (sound_num == 38) {
var sid = (sex - 1) * 10 + sound_num;
}
var tou = "00";
if (String(sid).length == 2) {
tou = "000";
}
else if (String(sid).length == 3) {
tou = "00";
}
if (!sid) {
return;
}
if(Utl.ReadData(Utl.Config.sound)==1){
GameData.isRecord=false;
//play_wav(tou + sid + ".mp3");
Utl.playSound(tou + sid + ".mp3");
}
}
}
}