local ZPDef = ZPFramework.ZPImport("zp_base.luaScript.ZPDef") local ZPSound = ZPFramework.ZPFrameworkClassImprot("zp_base.luaScript.ZPSound") local hejiangSound = class("hejiangSound", ZPSound) local path = "mj/res/sound" local luzhouPath = "luzhou/res/sound" hejiangSound.man = "c_man" hejiangSound.women = "c_women" hejiangSound.pre = "c_" hejiangSound.sound_t = 1 local function dealSex(s) local sex=tonumber(s) if sex~=1 and sex~=2 then sex=1 end return 2--sex end -- sound_t 1 普通话 2 方言 function hejiangSound.setSoundType( sound_t ) hejiangSound.sound_t = sound_t if sound_t == 1 then hejiangSound.man = "c_man" hejiangSound.women = "c_women" hejiangSound.pre = "c_" else hejiangSound.man = "man" hejiangSound.women = "women" hejiangSound.pre = "" end end function hejiangSound.PlayOperateSound(sex,opType) if hejiangSound.sound_t == 1 then--普通话 hejiangSound.super.PlayOperateSound(sex,opType) else if hejiangSound.OperateSoundConfig[opType] then sex = dealSex(sex) local name = string.format("%s/%s/%sluzhou_mj_%s_%s.ogg", luzhouPath,sex ==1 and hejiangSound.man or hejiangSound.women, hejiangSound.pre, sex, hejiangSound.OperateSoundConfig[opType]) playVoice(name) end end end function hejiangSound.PlayZPSound(sex,value) if hejiangSound.sound_t == 1 then--普通话 hejiangSound.super.PlayZPSound(sex,value) else sex = dealSex(sex) local name = string.format("%s/%s/%sluzhou_mj_%s_%x.ogg", luzhouPath,sex ==1 and hejiangSound.man or hejiangSound.women, hejiangSound.pre, sex, value) playVoice(name) end end function hejiangSound.PlayZhaNiao() playVoice(luzhouPath.."/hz_zhuaniao.ogg") end return hejiangSound