目录结构调整
This commit is contained in:
277
codes/games/client/Projects/doudizhu/js/ddz/sound.js
Normal file
277
codes/games/client/Projects/doudizhu/js/ddz/sound.js
Normal file
@@ -0,0 +1,277 @@
|
||||
var Sound = {
|
||||
|
||||
}
|
||||
Sound.zdtx = "00186.mp3";//炸弹特效
|
||||
Sound.cptx = "00187.mp3";//出牌特效
|
||||
Sound.cttx = "00188.mp3";//春天特效
|
||||
Sound.fptx = "00189.mp3";//翻牌特效
|
||||
Sound.fjtx = "00190.mp3";//飞机特效
|
||||
Sound.sjtx = "00191.mp3";//时间特效
|
||||
Sound.wztx = "00194.mp3";//王炸特效
|
||||
Sound.sltx = "00193.mp3";//胜利特效
|
||||
Sound.wzsytx = "00192.mp3";//王炸生硬特效
|
||||
//-------------------------------------------------------------------------------男
|
||||
Sound.one = [];
|
||||
for (var i = 0; i < 15; i++) {
|
||||
if (i>=10) {
|
||||
Sound.one[i] = "0012"+(i-10)+".mp3";
|
||||
}else{
|
||||
Sound.one[i] = "0011"+i+".mp3";
|
||||
}
|
||||
}
|
||||
Sound.one[Sound.one.length] = Sound.one[Sound.one.length-1];
|
||||
Sound.two = [];
|
||||
for (var i = 0; i < 13; i++) {
|
||||
if (i>=10) {
|
||||
Sound.two[i] = "0014"+(i-10)+".mp3";
|
||||
}else{
|
||||
Sound.two[i] = "0013"+i+".mp3";
|
||||
}
|
||||
}
|
||||
Sound.two[Sound.two.length] = Sound.two[Sound.two.length-1];
|
||||
Sound.three = [];
|
||||
for (var i = 0; i < 13; i++) {
|
||||
if (i>=10) {
|
||||
Sound.three[i] = "0016"+(i-10)+".mp3";
|
||||
}else{
|
||||
Sound.three[i] = "0015"+i+".mp3";
|
||||
}
|
||||
}
|
||||
Sound.three[Sound.three.length] = Sound.three[Sound.three.length-1];
|
||||
Sound.shree_one = "00163.mp3";//单带一
|
||||
Sound.shree_two = "00164.mp3";//单带二
|
||||
Sound.police_one = "00126.mp3";//剩一张牌
|
||||
Sound.police_two = "00127.mp3";//剩二张牌
|
||||
Sound.feiji = "00170.mp3";//飞机
|
||||
Sound.liandui = "00171.mp3";//连对
|
||||
Sound.shunzi = "00172.mp3";//顺子
|
||||
Sound.sier = "00173.mp3";//四带二
|
||||
Sound.sierdui = "00174.mp3";//四带两对
|
||||
Sound.boom = "00175.mp3";//炸弹
|
||||
Sound.wangboom = "00176.mp3";//王炸
|
||||
|
||||
Sound.nv_one = [];
|
||||
for (var i = 0; i < 15; i++) {
|
||||
if (i>=10) {
|
||||
Sound.nv_one[i] = "0022"+(i-10)+".mp3";
|
||||
}else{
|
||||
Sound.nv_one[i] = "0021"+i+".mp3";
|
||||
}
|
||||
}
|
||||
Sound.nv_one[Sound.nv_one.length] = Sound.nv_one[Sound.nv_one.length-1];
|
||||
Sound.nv_two = [];
|
||||
for (var i = 0; i < 13; i++) {
|
||||
if (i>=10) {
|
||||
Sound.nv_two[i] = "0024"+(i-10)+".mp3";
|
||||
}else{
|
||||
Sound.nv_two[i] = "0023"+i+".mp3";
|
||||
}
|
||||
}
|
||||
Sound.nv_two[Sound.nv_two.length] = Sound.nv_two[Sound.nv_two.length-1];
|
||||
Sound.nv_three = [];
|
||||
for (var i = 0; i < 13; i++) {
|
||||
if (i>=10) {
|
||||
Sound.nv_three[i] = "0026"+(i-10)+".mp3";
|
||||
}else{
|
||||
Sound.nv_three[i] = "0025"+i+".mp3";
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------------------------------------------女
|
||||
Sound.nv_three[Sound.nv_three.length] = Sound.nv_three[Sound.nv_three.length-1];
|
||||
Sound.nv_shree_one = "00263.mp3";//单带一
|
||||
Sound.nv_shree_two = "00264.mp3";//单带二
|
||||
Sound.nv_police_one = "00226.mp3";//剩一张牌
|
||||
Sound.nv_police_two = "00227.mp3";//剩二张牌
|
||||
Sound.nv_feiji = "00270.mp3";//飞机
|
||||
Sound.nv_liandui = "00271.mp3";//连对
|
||||
Sound.nv_shunzi = "00272.mp3";//顺子
|
||||
Sound.nv_sier = "00273.mp3";//四带二
|
||||
Sound.nv_sierdui = "00274.mp3";//四带两对
|
||||
Sound.nv_boom = "00275.mp3";//炸弹
|
||||
Sound.nv_wangboom = "00276.mp3";//王炸
|
||||
|
||||
var sound = function(){
|
||||
if(!Public_data.data.cardtype[2]){
|
||||
return;
|
||||
}
|
||||
if (Utl.getSexBySeat(game.seat) == 1) {
|
||||
if (Public_data.data.cardtype[2] == 1) {//单牌
|
||||
if (Public_data.data.cardtype[1][0][4] == 53) {
|
||||
Utl.playSound(Sound.one[Sound.one.length-3]);
|
||||
} else if (Public_data.data.cardtype[1][0][4] == 54) {
|
||||
Utl.playSound(Sound.one[Sound.one.length-1]);
|
||||
} else if (Public_data.data.cardtype[1][0][4] == 16) {
|
||||
Utl.playSound(Sound.one[Sound.one.length-4]);
|
||||
} else {
|
||||
Utl.playSound(Sound.one[Public_data.data.cardtype[1][0][4]-3]);
|
||||
}
|
||||
|
||||
}else if (Public_data.data.cardtype[2] == 2) {//对子
|
||||
if (Public_data.data.cardtype[1][0][4] == 16) {
|
||||
Utl.playSound(Sound.two[Sound.two.length-1]);
|
||||
} else {
|
||||
Utl.playSound(Sound.two[Public_data.data.cardtype[1][0][4]-3]);
|
||||
}
|
||||
} else if (Public_data.data.cardtype[2] == 3) {//顺子
|
||||
Utl.playSound(Sound.shunzi);
|
||||
All_ani.shunzi.show(1);
|
||||
}else if (Public_data.data.cardtype[2] == 4) {//连对
|
||||
Utl.playSound(Sound.liandui);
|
||||
All_ani.liandui.show(1);
|
||||
}else if (Public_data.data.cardtype[2] == 5) {//三条
|
||||
if (Public_data.data.cardtype[1][0][4] == 16) {
|
||||
Utl.playSound(Sound.three[Sound.three.length-1]);
|
||||
} else {
|
||||
Utl.playSound(Sound.three[Public_data.data.cardtype[1][0][4]-3]);
|
||||
}
|
||||
|
||||
}else if (Public_data.data.cardtype[2] == 6) {//三带一
|
||||
Utl.playSound(Sound.shree_one);
|
||||
} else if (Public_data.data.cardtype[2] == 7){//三带一对
|
||||
Utl.playSound(Sound.shree_two);
|
||||
}
|
||||
else if (Public_data.data.cardtype[2] == 8) {//飞机
|
||||
Utl.playSound(Sound.feiji);
|
||||
All_ani.feiji.show(1);
|
||||
Utl.playSound(Sound.fjtx);
|
||||
}else if (Public_data.data.cardtype[2] == 9) {//炸弹
|
||||
Utl.playSound(Sound.boom);
|
||||
All_ani.zhadan.show(1);
|
||||
Utl.playSound(Sound.zdtx);
|
||||
}else if (Public_data.data.cardtype[2] == 10) {//四带二
|
||||
Utl.playSound(Sound.sier);
|
||||
}else if (Public_data.data.cardtype[2] == 10) {//四带二对
|
||||
Utl.playSound(Sound.sierdui);
|
||||
}else if (Public_data.data.cardtype[2] == 12) {//王炸
|
||||
Utl.playSound(Sound.wangboom);
|
||||
All_ani.wangzha.show();
|
||||
Utl.playSound(Sound.wztx);
|
||||
Utl.stopMusic();
|
||||
Game_Config.soundList.MainSceneMusic = Sound.wzsytx;//王炸声音特效
|
||||
Utl.playMusic();
|
||||
set_self(All_timer.wzsy,57,All_timer.time.wzsy,0,0);
|
||||
}
|
||||
}else{
|
||||
if (Public_data.data.cardtype[2] == 1) {//单牌
|
||||
if (Public_data.data.cardtype[1][0][4] == 53) {
|
||||
Utl.playSound(Sound.nv_one[Sound.one.length-3]);
|
||||
} else if (Public_data.data.cardtype[1][0][4] == 54) {
|
||||
Utl.playSound(Sound.nv_one[Sound.one.length-1]);
|
||||
}else if (Public_data.data.cardtype[1][0][4] == 16) {
|
||||
Utl.playSound(Sound.nv_one[Sound.one.length-4]);
|
||||
} else {
|
||||
Utl.playSound(Sound.nv_one[Public_data.data.cardtype[1][0][4]-3]);
|
||||
}
|
||||
}else if (Public_data.data.cardtype[2] == 2) {//对子
|
||||
if (Public_data.data.cardtype[1][0][4] == 16) {
|
||||
Utl.playSound(Sound.nv_two[Sound.nv_two.length-1]);
|
||||
} else {
|
||||
Utl.playSound(Sound.nv_two[Public_data.data.cardtype[1][0][4]-3]);
|
||||
}
|
||||
} else if (Public_data.data.cardtype[2] == 3) {//顺子
|
||||
Utl.playSound(Sound.nv_shunzi);
|
||||
All_ani.shunzi.show(1);
|
||||
}else if (Public_data.data.cardtype[2] == 4) {//连对
|
||||
Utl.playSound(Sound.nv_liandui);
|
||||
All_ani.liandui.show(1);
|
||||
}else if (Public_data.data.cardtype[2] == 5) {//三条
|
||||
if (Public_data.data.cardtype[1][0][4] == 16) {
|
||||
Utl.playSound(Sound.nv_three[Sound.nv_three.length-1]);
|
||||
} else {
|
||||
Utl.playSound(Sound.nv_three[Public_data.data.cardtype[1][0][4]-3]);
|
||||
}
|
||||
} else if (Public_data.data.cardtype[2] == 6) {//三带一
|
||||
Utl.playSound(Sound.nv_shree_one);
|
||||
}else if (Public_data.data.cardtype[2] == 7) {//三带一对
|
||||
Utl.playSound(Sound.nv_shree_two);
|
||||
}
|
||||
else if (Public_data.data.cardtype[2] == 8) {//飞机
|
||||
Utl.playSound(Sound.nv_feiji);
|
||||
All_ani.feiji.show(1);
|
||||
Utl.playSound(Sound.fjtx);
|
||||
}else if (Public_data.data.cardtype[2] == 9) {//炸弹
|
||||
Utl.playSound(Sound.nv_boom);
|
||||
All_ani.zhadan.show(1);
|
||||
Utl.playSound(Sound.zdtx);
|
||||
}else if (Public_data.data.cardtype[2] == 10) {///四带二
|
||||
Utl.playSound(Sound.nv_sier);
|
||||
}else if (Public_data.data.cardtype[2] == 11) {//四带二对
|
||||
Utl.playSound(Sound.nv_sierdui);
|
||||
}
|
||||
else if (Public_data.data.cardtype[2] == 12) {//王炸
|
||||
Utl.playSound(Sound.nv_wangboom);
|
||||
All_ani.wangzha.show();
|
||||
Utl.playSound(Sound.wztx);
|
||||
Utl.stopMusic();
|
||||
Game_Config.soundList.MainSceneMusic = Sound.wzsytx;//王炸声音特效
|
||||
Utl.playMusic();
|
||||
set_self(All_timer.wzsy,57,All_timer.time.wzsy,0,0);
|
||||
}
|
||||
}
|
||||
}
|
||||
Sound.pass = ["00179.mp3","00180.mp3","00181.mp3","00182.mp3"];//不要
|
||||
Sound.nv_pass = ["00279.mp3","00280.mp3","00281.mp3","00282.mp3"];//不要
|
||||
var passsound = function(){//不要
|
||||
if (Utl.getSexBySeat(game.seat) == 1) {
|
||||
Utl.playSound(Sound.pass[ifast_random(4)]);
|
||||
}else{
|
||||
Utl.playSound(Sound.nv_pass[ifast_random(4)]);
|
||||
}
|
||||
}
|
||||
Sound.jiabei = ["00178.mp3","00177.mp3"];//加倍
|
||||
Sound.nv_jiabei = ["00278.mp3","00277.mp3"];//加倍
|
||||
var jiabeisound = function (){//音效
|
||||
if (Utl.getSexBySeat(game.seat) == 1) {
|
||||
if (Public_data.data.playerlist[4][game.seat] == 1) {//加倍
|
||||
Utl.playSound(Sound.jiabei[1]);
|
||||
}else if (Public_data.data.playerlist[4][game.seat] == 0) {//不加倍
|
||||
Utl.playSound(Sound.jiabei[0]);
|
||||
}
|
||||
} else {
|
||||
if (Public_data.data.playerlist[4][game.seat] == 1) {//加倍
|
||||
Utl.playSound(Sound.nv_jiabei[1]);
|
||||
}else if (Public_data.data.playerlist[4][game.seat] == 0) {//不加倍
|
||||
Utl.playSound(Sound.nv_jiabei[0]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Sound.lootbanket = ["00183.mp3","00184.mp3","00185.mp3","00195.mp3"];//叫分
|
||||
Sound.nv_lootbanket = ["00183.mp3","00184.mp3","00185.mp3","00295.mp3"];//叫分
|
||||
|
||||
var lootbanketsound = function (){//叫分音效
|
||||
if (Public_data.data.playerlist[3][game.seat] == 0) {//不叫
|
||||
if (Utl.getSexBySeat(game.seat) == 1) {
|
||||
Utl.playSound(Sound.lootbanket[3]);
|
||||
}else{
|
||||
Utl.playSound(Sound.nv_lootbanket[3]);
|
||||
}
|
||||
}else{
|
||||
if (Utl.getSexBySeat(game.seat) == 1) {//叫几分
|
||||
Utl.playSound(Sound.lootbanket[Public_data.data.down_score[0]-1]);
|
||||
}else{
|
||||
Utl.playSound(Sound.nv_lootbanket[Public_data.data.down_score[0]-1]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user