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