|
|
- Message = Message or {}
- local Message = Message
- --sound_type "fault" "award" "success"
- function Message.show(str,sound_type)
- if sound_type then
- --[[@
- 这里只侦听失败的音效;
- 成功/获得奖励的音效,统一放到背包跟货币新增的时候去触发,不需要每个模块都加;
- 个别遗漏的情况就单独调用lua_soundM:PlayUIEffectSound(LuaSoundManager.SOUND_UI.SUCCESS)
- ]]
- local use_sound_type
- if sound_type == "fault" then
- use_sound_type = LuaSoundManager.SOUND_UI.FAULT
- end
- lua_soundM:PlayUIEffectSound(use_sound_type)
- end
- -- local arg = {...}
- -- local result="";
-
- -- for key, var in ipairs(arg) do
- -- if type(var)=="table" then
- -- for key1, var1 in ipairs(var) do
- -- result=result.."[key]"..key1.."[var]"..var1.."\n"
- -- end
- -- elseif type(var)=="userdata" then
- -- result = result.."a userdata"
- -- else
- -- result = result .. var
- -- end
- -- end
- str = str or ""
- SysInfoCtrl.Instance:AppendMsg(SysInfoCtrl.SysInfoType.MINI,str)
- end
- --批量show,做时间间隔。
- function Message.listshow(str_list)
- if #str_list<=0 then
- return
- end
- local timer
- local call=function ( ... )
- if #str_list>0 then
- str=table.remove(str_list,1)
- Message.show(str)
- else
- TimerQuest.CancelQuest(GlobalTimerQuest, timer)
- return true
- end
- end
- timer=TimerQuest.AddPeriodQuest(GlobalTimerQuest, call,0.3,-1)
- end
|