Files
youle_cocos/projects/majiang_jx/js/flow/sound.js
T
joywayerandClaude Opus 4.8 7ab748919a chore: 纳入项目全部源码进根仓库统一管理
删除 YouleNexus 内嵌 .git,统一由根仓库唯一管理。提交:
- projects/ 旧 H5 模板 Game_Surface_3 与各子游戏源码
- cocoscreator_projects/YouleNexus 工程 + cocos-creator-mcp 扩展源码
- CLAUDE.md、.mcp.json 等配置
library/temp/node_modules/dist 等缓存由 .gitignore 排除。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 11:55:13 +08:00

50 lines
1.5 KiB
JavaScript

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");
}
}
}
}